Simplify the https check logic using request.is_https which is smarter.

This commit is contained in:
Michele Comitini
2012-05-15 22:38:43 +02:00
parent 776f39922e
commit 14d24f496e
+1 -2
View File
@@ -25,8 +25,7 @@ try:
except:
hosts = (http_host, )
if request.env.http_x_forwarded_for or request.env.wsgi_url_scheme\
in ['https', 'HTTPS']:
if request.env.http_x_forwarded_for or request.is_https:
session.secure()
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"):
raise HTTP(200, T('appadmin is disabled because insecure channel'))