Use headers dict instead of HTTP_* kwargs or request.META
This commit is contained in:
parent
224fae7a87
commit
624115bf11
5 changed files with 47 additions and 19 deletions
|
@ -231,7 +231,7 @@ def maybe_redirect_local_path(request, model):
|
|||
def redirect_to_referer(request, *args, **kwargs):
|
||||
"""Redirect to the referrer, if it's in our domain, with get params"""
|
||||
# make sure the refer is part of this instance
|
||||
validated = validate_url_domain(request.META.get("HTTP_REFERER"))
|
||||
validated = validate_url_domain(request.headers.get("referer", ""))
|
||||
|
||||
if validated:
|
||||
return redirect(validated)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue