Auth(secure=True), thanks Yarin and Niphlod
This commit is contained in:
+5
-2
@@ -123,6 +123,8 @@ except:
|
||||
|
||||
load()
|
||||
|
||||
HTTPS_SCHEMES = set(('https','HTTPS'))
|
||||
|
||||
def get_client(env):
|
||||
"""
|
||||
guess the client address from the environment variables
|
||||
@@ -445,8 +447,9 @@ def wsgibase(environ, responder):
|
||||
ajax = x_req_with == 'xmlhttprequest',
|
||||
cid = env.http_web2py_component_element,
|
||||
is_local = env.remote_addr in local_hosts,
|
||||
is_https = env.wsgi_url_scheme \
|
||||
in ['https', 'HTTPS'] or env.https=='on')
|
||||
is_https = env.wsgi_url_scheme in HTTPS_SCHEMES \
|
||||
or request.env.http_x_forwarded_proto in HTTPS_SCHEMES \
|
||||
or env.https=='on')
|
||||
request.uuid = request.compute_uuid() # requires client
|
||||
request.url = environ['PATH_INFO']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user