[Django] #34290: X-Forwarded-Prefix support

94 views
Skip to first unread message

Django

unread,
Jan 24, 2023, 5:14:32 PM1/24/23
to django-...@googlegroups.com
#34290: X-Forwarded-Prefix support
-----------------------------------------+-----------------------------
Reporter: Marc Perrin | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: 4.1
Severity: Normal | Keywords: X-Forwarded
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+-----------------------------
Is there any plan to deal with the **X-Forwarded-Prefix** header?

(similar to
{{{
USE_X_FORWARDED_HOST
}}}
and
{{{
USE_X_FORWARDED_PORT
}}}
for X-Forwarded-Host and X-Forwarded-Port)

(NB: and as far as X-Forwarded-Proto is concerned, it's usually dealt with
via
{{{
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
}}}
)

Or is this header not standard enough?

If not, what would be a standard - or at least effective - way for a user
to (sort of) customize HttpRequest (get_raw_uri, build_absolute_uri) to
deal with this header?

--
Ticket URL: <https://code.djangoproject.com/ticket/34290>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 24, 2023, 11:56:29 PM1/24/23
to django-...@googlegroups.com
#34290: X-Forwarded-Prefix support
-------------------------------+--------------------------------------

Reporter: Marc Perrin | Owner: nobody
Type: New feature | Status: closed

Component: HTTP handling | Version: 4.1
Severity: Normal | Resolution: needsinfo

Keywords: X-Forwarded | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => needsinfo


Comment:

Thanks for the ticket. TBH, I've never heard about `X-Forwarded-Prefix` it
seems to be another non-standard header set by some proxies.

> Or is this header not standard enough?

Is this standard at all? I couldn't find any RFC or reliable docs on this.

> If not, what would be a standard - or at least effective - way for a
user to (sort of) customize HttpRequest (get_raw_uri, build_absolute_uri)
to deal with this header?

Please use one of
[https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
support channels] for support questions.

--
Ticket URL: <https://code.djangoproject.com/ticket/34290#comment:1>

Django

unread,
Jan 25, 2023, 9:14:17 AM1/25/23
to django-...@googlegroups.com
#34290: X-Forwarded-Prefix support
-------------------------------+--------------------------------------
Reporter: Marc Perrin | Owner: nobody
Type: New feature | Status: closed
Component: HTTP handling | Version: 4.1
Severity: Normal | Resolution: needsinfo
Keywords: X-Forwarded | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Marc Perrin):

Thanks for the answer, yeah it seems non-standard (Traefik reverse proxy;
also mentioned here: https://microsoft.github.io/reverse-
proxy/articles/transforms.html)

--
Ticket URL: <https://code.djangoproject.com/ticket/34290#comment:2>

Reply all
Reply to author
Forward
0 new messages