Skip to content

Commit

Permalink
nevermind, that might cause more probs than it fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hpiwowar committed Apr 24, 2016
1 parent 0897145 commit 16d00e5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions totalimpactwebapp/views.py
Expand Up @@ -231,16 +231,16 @@ def load_user(profile_id):



# @app.before_request
# def redirect_to_https():
# try:
# if request.headers["X-Forwarded-Proto"] == "https":
# pass
# else:
# return redirect(request.url.replace("http://", "https://"), 301) # permanent
# except KeyError:
# #logger.debug(u"There's no X-Forwarded-Proto header; assuming localhost, serving http.")
# pass
@app.before_request
def redirect_to_https():
try:
if request.headers["X-Forwarded-Proto"] == "https":
pass
else:
return redirect(request.url.replace("http://", "https://"), 301) # permanent
except KeyError:
#logger.debug(u"There's no X-Forwarded-Proto header; assuming localhost, serving http.")
pass


@app.before_request
Expand Down

0 comments on commit 16d00e5

Please sign in to comment.