Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
paas2-auth-sidecar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ASM
paas2-auth-sidecar
Commits
680f9b48
Commit
680f9b48
authored
Apr 05, 2017
by
Morten Knutsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use scheme from forwarded header if available.
parent
5a57ffd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
lua/auth.lua
lua/auth.lua
+6
-1
No files found.
lua/auth.lua
View file @
680f9b48
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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment