In a brief search, I could not find any docs for X-Forwarded-Prefix.
MDN documents X-Forwarded-For and others:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
To customize those functions, you could use a middleware to modify requests
to wrap them:
class ExampleMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
request.get_raw_uri = wrap_get_raw_uri(request.get_raw_uri)
# ...
return self.get_response(request)
def wrap_get_raw_uri(func):
def wrapper(*args, **kwargs):
value = func(*args, **kwargs)
# change value appropriately
return value
return wrapper
On Tue, Jan 24, 2023 at 9:58 PM 'Marc Perrin' via Django developers
(Contributions to Django itself) <[email protected]> wrote:
> Hi,
> I've been looking at the current support for X-Forwarded headers (cf.
> https://code.djangoproject.com/ticket/30729 or
> https://code.djangoproject.com/ticket/31354 for example).
> Is there any plan to deal with *X-Forwarded-Prefix*? Or is that header
> not std enough?
> If not, I'm not sure what would be the best / usual way for a user to
> customize HttpRequest (get_raw_uri, build_absolute_uri) to deal with it.
> Thanks,
> Marc
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/541333bb-9238-46ae-bea4-cbe28d3dce42n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/541333bb-9238-46ae-bea4-cbe28d3dce42n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/CAMyDDM29iYgktcqj8Pr2z%2BN%2B5nXWqwzK7LyV5OoRAxbgGZ91YA%40mail.gmail.com.