Opened 12 years ago
Last modified 12 years ago
#18987 closed Uncategorized
Django contrib admin redirection error on actions — at Initial Version
Reported by: | audirs2 [at] gmail.com | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.4 |
Severity: | Normal | Keywords: | redirect remote_auth_backend nginx |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When user remote user authentication backend and accessing django application via Nginx proxy on subdomain behind this proxy the admin interface does not redirect from admin actions correctly.
Settings below are applied:
FORCE_SCRIPT_NAME=
APPEND_SLASH=False
Server is running mod_wsgi
accessing works ok.
https://djangoapp.domain.com/admin/
When using an admin action to add/delete etc redirects badly.
E.g. on page url below you update some config and click add as the admin action, the underlying code carries out the action.
https://djangoapp.domain.com/admin/appname/add/
However when django redirects back to the apps list of objects it redirects badly to a url shown in the form below
https://djangoapp.domain.com/admin/appname/add/.domain.com/admin/appname/add/
It appears that the url resolution is using the domain with subdomain stripped and then as this is not the same full url it appends this url to the current one