Use path-only URLs for pagination response #8957
Unanswered
shamoon
asked this question in
Ideas & Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pardon me if this is not a good idea for reasons I don't appreciate
Recently we had an issue raised that next/previous URLs use the wrong protocol e.g. http instead of https. This led us to come across a few relevant discussions, principally https://stackoverflow.com/questions/42818940/django-rest-framework-pagination-links-do-not-use-https & #8685
The solution is to use https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-SECURE_PROXY_SSL_HEADER as explained in the docs but this all left me wondering whether it would be reasonable to just return a path eg
/api/model/?page=2
in the response?Beta Was this translation helpful? Give feedback.
All reactions