#33569: Add support for multiple values for the x-forwarded-proto header
-------------------------------------+-------------------------------------
     Reporter:  Thomas Schmidt       |                    Owner:  Thomas
         Type:                       |  Schmidt
  Cleanup/optimization               |                   Status:  closed
    Component:  HTTP handling        |                  Version:  dev
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * status:  assigned => closed
 * resolution:   => wontfix


Comment:

 As far as I'm aware, we cannot answer in the reliable way whether the
 request was over HTTPS, when `X-Forwarded-Proto` contains multiple values.
 Unfortunately it depends on which layer is trusted. We could check if all
 values are "https", but this could be unacceptable with in-companies
 proxies. It's definitely not enough to check if "https" is used somewhere
 in the pipeline.

 As a workaround you can set list of protocols in the
 `SECURE_PROXY_SSL_HEADER`, e.g. `SECURE_PROXY_SSL_HEADER =
 ("HTTP_X_FORWARDED_PROTO", "https,http")`. I don't think it's worth
 additional complexity. You can start a discussion on DevelopersMailingList
 if you don't agree.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates/0107017f72c70aa1-4e40bb3c-c48a-4bfc-89f4-4006768f8c8d-000000%40eu-central-1.amazonses.com.

Reply via email to