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.
このコミットが含まれているのは:
Ben Busby 2021-11-20 16:43:57 -07:00
コミット 0c5578937e
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 339B7B7EB5333D14
1個のファイルの変更0行の追加6行の削除

ファイルの表示

@ -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://',