Skip to content

Commit e77d015

Browse files
authored
Restore request.host
Flask example hits error: AttributeError: 'Request' object has no attribute 'netloc'
1 parent f77d62e commit e77d015

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demo-flask/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def prepare_flask_request(request):
2323
# If server is behind proxys or balancers use the HTTP_X_FORWARDED fields
2424
return {
2525
'https': 'on' if request.scheme == 'https' else 'off',
26-
'http_host': request.netloc,
26+
'http_host': request.host,
2727
'script_name': request.path,
2828
'get_data': request.args.copy(),
2929
# Uncomment if using ADFS as IdP, https://github.com/onelogin/python-saml/pull/144

0 commit comments

Comments
 (0)