D61-IA / stellar-gnosis

Gnosis paper management and collaboration tool
Apache License 2.0
0 stars 1 forks source link

Some urls do not end with slash #60

Closed Zhenghao-Zhao closed 4 years ago

Zhenghao-Zhao commented 4 years ago

According to django doc on APPEND_SLASH: "When set to True, if the request URL does not match any of the patterns in the URLconf and it doesn’t end in a slash, an HTTP redirect is issued to the same URL with a slash appended. Note that the redirect may cause any data submitted in a POST request to be lost." (https://docs.djangoproject.com/en/3.0/ref/settings/)

This means if you want an url to work, with or without trailing, you should modify the original url to have a trailing slash. After that when APPEND_SLASH automatically adds a trailing slash to input url that does not end with trailing slash, it will match the original url.