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
Ben Busby 2021-11-20 16:43:57 -07:00
parent de28e06d8f
commit 0c5578937e
No known key found for this signature in database
GPG Key ID: 339B7B7EB5333D14
1 changed files with 0 additions and 6 deletions

View File

@ -133,12 +133,6 @@ def before_request_func():
session.pop('_permanent', None) session.pop('_permanent', None)
g.user_config = Config(**default_config) 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: if not g.user_config.url:
g.user_config.url = request.url_root.replace( g.user_config.url = request.url_root.replace(
'http://', 'http://',