diff options
author | Paolo Melchiorre | 2022-12-05 22:44:50 +0100 |
---|---|---|
committer | GitHub | 2022-12-05 14:44:50 -0700 |
commit | 22e25ac454b52686685d4d9f1241416cd35fafda (patch) | |
tree | 6796235a63e5e9dd549f29a640bbb2e6c0de17a0 /users/shortcuts.py | |
parent | e3f1039a5f976af1c9874e79bcaac396b7b8b4f2 (diff) | |
download | takahe-22e25ac454b52686685d4d9f1241416cd35fafda.tar.gz takahe-22e25ac454b52686685d4d9f1241416cd35fafda.tar.bz2 takahe-22e25ac454b52686685d4d9f1241416cd35fafda.zip |
Add django-upgrade to pre-commit (#114)
Diffstat (limited to 'users/shortcuts.py')
-rw-r--r-- | users/shortcuts.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/users/shortcuts.py b/users/shortcuts.py index 0726218..8377a7f 100644 --- a/users/shortcuts.py +++ b/users/shortcuts.py @@ -9,10 +9,10 @@ def by_handle_or_404(request, handle, local=True, fetch=False) -> Identity: Domain-sensitive, so it will understand short handles on alternate domains. """ if "@" not in handle: - if "HTTP_HOST" not in request.META: + if "host" not in request.headers: raise Http404("No hostname available") username = handle - domain_instance = Domain.get_domain(request.META["HTTP_HOST"]) + domain_instance = Domain.get_domain(request.headers["host"]) if domain_instance is None: raise Http404("No matching domains found") domain = domain_instance.domain |