-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Description
I have run into this issue in multiple setups.
Steps to reproduce:
- install and run py4web using a url_prefix
- configure nginx or apache to serve as a reverse proxy for the instance of py4web
- You will need to remove the leading slashes in the URL functions in the index.html of the _default app as the url paths are not relative and so the buttons defined in the default app don't work when using a url_prefix. Alternatively you can just enter the url for the _dashboard manually in your browser.
- go to the _dashboard and click on the _scaffold app
- go to the databases section and click on auth_user
- click on the New button
- you should get a 404 error because the url_prefix is in the url 2x
The cause of this seems to be coming from core.py where the url_prefix is added twice when you click on the auth_user table which triggers the creation of a grid which builds the url. I have proposed a fix in a PR, although it is maybe more of a workaround.
This important for us to have fixed as we are migrating from web2py and the only alternative is a rewrite in our apache config. Adding a rewrite is not a good option for us because the double url_prefix will still be visible in the apps when hovering and it will really complicate our config files for Apache.
Metadata
Metadata
Assignees
Labels
No labels