File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
demo_pyramid/demo_pyramid Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,15 @@ def init_saml_auth(req):
1515
1616
1717def prepare_pyramid_request (request ):
18- # If server is behind proxys or balancers use the HTTP_X_FORWARDED fields
18+ ## Uncomment this portion to set the request.scheme and request.server_port
19+ ## based on the supplied `X-Forwarded` headers.
20+ ## Useful for running behind reverse proxies or balancers.
21+ #
22+ # if 'X-Forwarded-Proto' in request.headers:
23+ # request.scheme = request.headers['X-Forwarded-Proto']
24+ # if 'X-Forwarded-Port' in request.headers:
25+ # request.server_port = int(request.headers['X-Forwarded-Port'])
26+
1927 return {
2028 'https' : 'on' if request .scheme == 'https' else 'off' ,
2129 'http_host' : request .host ,
You can’t perform that action at this time.
0 commit comments