Django REST Framework pagination links do not use HTTPS

后端 未结 2 1633
轮回少年
轮回少年 2021-02-05 03:53

I\'m setting up pagination for a certain DRF endpoint that works well- however when deployed on my server, which uses HTTPS, the links to the next & previous pages are forme

2条回答
  •  走了就别回头了
    2021-02-05 04:47

    Do I need to set that Django SECURE_PROXY_SSL_HEADER? I wasn't sure, given the warning that it's potentially insecure.

    Yes you do. However, you need to take care about what's your doing. In particular making sure it drop the X-Forwarded-Proto from outside.

提交回复
热议问题