mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 08:56:02 +03:00
[GH-ISSUE #2567] hard coded path won't work if you use a path prefix #1639
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1639
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gawel on GitHub (Jul 20, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2567
Impacted versions
Steps to reproduce
Create a urls.py file and use it in your settings:
Current behavior
There is some hard coded links in the js files. At least for the 2FA auth:
github.com/modoboa/modoboa@fda59b51e1/modoboa/static/js/twocols_nav.js (L180)But the real url is
/manager/api/...so the ajax request fail with a 404Same problem with the new vuejs UI. Everything is expected to be at
/new-admin/but we need/manager/new-admin. I guess this one can be fixed with sedExpected behavior
Api calls should work even if we use a prefix
A solution is to define a js variable with the correct prefix. Something like:
And use this var in the js files.
@ksaadDE commented on GitHub (Jul 25, 2022):
Could you create a patch + PR for this?
To my understanding of reading it for a few seconds, it might be a variable change in the files, since it is hardcoded right?
@gawel commented on GitHub (Aug 18, 2022):
PR done for the tfa stuff. Looks likes a postgres test is failing because of... mysql. Not sure how to fix that
@ksaadDE commented on GitHub (Aug 24, 2022):
@tonioo
@tonioo commented on GitHub (Sep 5, 2022):
For the record, it's not possible to conditionally start services with GHA (see https://github.com/actions/runner/issues/822)