Commit 680f9b48 authored by Morten Knutsen's avatar Morten Knutsen

Use scheme from forwarded header if available.

parent 5a57ffd7
local headers = ngx.req.get_headers()
local returnTo = ngx.req.get_uri_args().ReturnTo
local scheme = headers["x-forwarded-proto"]
if not scheme then
scheme = ngx.var.scheme
end
if not returnTo then
returnTo = ngx.var.scheme .. '://' .. ngx.var.host .. '/'
returnTo = scheme .. '://' .. ngx.var.host .. '/'
end
local authServer = os.getenv('auth_server')
local idp = os.getenv('idp')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment