From 0c5578937eec7f23a8921439e0e7cde1ef669271 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sat, 20 Nov 2021 16:43:57 -0700 Subject: [PATCH] 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. --- app/routes.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/routes.py b/app/routes.py index b630be5..e85bb50 100644 --- a/app/routes.py +++ b/app/routes.py @@ -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://',