I have Django project hosted on Heroku
There's a web-application and a Django REST API.
I'm using SECURE_SSL_REDIRECT
and SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
to redirect all http traffic to https.
The web-application is happy. If I try to use a http link, it redirects to https, and I can use forms, etc.
For the Django REST API, if I try a http link and a POST request, it redirects successfully to https but the method becomes a GET and the API requests the request (because it is meant to be a POST).
I do not know if this is expected behaviour, or if this is a Heroku specific thing. If it's expected for redirects, I'd appreciate to understand why (from a technical point).
And or if there is a solution.