Remove 308 redirect for http->https
HTTPS upgrades should be handled outside of Whoogle, since Flask often doesn't detect the right protocol when being used behind a reverse proxy such as Nginx.main
parent
de28e06d8f
commit
0c5578937e
|
@ -133,12 +133,6 @@ def before_request_func():
|
|||
session.pop('_permanent', None)
|
||||
g.user_config = Config(**default_config)
|
||||
|
||||
# Handle https upgrade
|
||||
if needs_https(request.url):
|
||||
return redirect(
|
||||
request.url.replace('http://', 'https://', 1),
|
||||
code=308)
|
||||
|
||||
if not g.user_config.url:
|
||||
g.user_config.url = request.url_root.replace(
|
||||
'http://',
|
||||
|
|
Loading…
Reference in New Issue