You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For WSGI applications hosted behind Apache in a sub-path,resolve(reverse(<view name>)) doesn't work. This is currently used in app/search/search_export.py (where the issue was found) and in app/etl_modules/save.py.
The reverse function prepends the URL with the value of settings.FORCE_SCRIPT_NAME, and resolve() can't find it.
For our implementation we have a reverse proxy directing traffic from https://hostname/bc-fossil-management to the Arches WSGI application. We have the FORCE_SCRIPT_NAME set to /bc-fossil-management/. All requests through the reverse proxy function as expected, but when running an export via Celery the search URL can't be found. The cause for this is that reverse("search_results") returns /bc-fossil-management/search/results but the path expected by the URL resolver is /search/results.
@jacobtylerwalls - Thanks for having a look. PR is here: #11717
A readme doesn't exist for 7.6.5 (which I'm assuming is the next patch release) so I haven't added a changelog entry. I can add a new empty readme as part of this PR if that's OK.
For WSGI applications hosted behind Apache in a sub-path,
resolve(reverse(<view name>))
doesn't work. This is currently used inapp/search/search_export.py
(where the issue was found) and inapp/etl_modules/save.py
.The
reverse
function prepends the URL with the value of settings.FORCE_SCRIPT_NAME, andresolve()
can't find it.For our implementation we have a reverse proxy directing traffic from
https://hostname/bc-fossil-management
to the Arches WSGI application. We have the FORCE_SCRIPT_NAME set to/bc-fossil-management/
. All requests through the reverse proxy function as expected, but when running an export via Celery the search URL can't be found. The cause for this is thatreverse("search_results")
returns/bc-fossil-management/search/results
but the path expected by the URL resolver is/search/results
.Fixed in our instance by change the following:
to
Looks like this was introduced in this commit: a4d11bd
The above seems to work however there may be a cleaner solution.
The text was updated successfully, but these errors were encountered: