Fix redirects when hosted at a non-root location #1310
This issue was found by @taupalosaurus.
The text was updated successfully, but these errors were encountered:
The `request.full_path` field does not contain any hosting prefixes as set by `APPLICATION_ROOT` and `SCRIPT_NAME` so redirects fail when the application is not hosted at the root location. Using the `request.url` field instead fixes the redirects. There's a nice comparison of the various request URL parts here: https://stackoverflow.com/a/46176337