Skip to content

HyperlinkedModelSerializer doesn't respect SECURE_PROXY_SSL_HEADER settings #9376

@ykursav

Description

@ykursav

Hello,

I am using django behind docker proxy and after that with nginx reverse proxy (serves as http). Docker proxy wrapping around nginx for https. The issue when I set SECURE_PROXY_SSL_HEADER like below, I am retrieving HyperlinkedModelSerializer url field as http instead of https. In my opinion, expected behaviour should be returning https and respecting that django setting.

SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")

Checklist

  • Raised initially as discussion #...
  • This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
  • I have reduced the issue to the simplest possible case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions