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
I run into an issue when trying to migrate my web2py projects into py4web. py4web does not have the routes.py which I used befoe to map URLs to applications. I would like to achive the following setup:
Notice the two myapp1 in the URL. All this means that Auth uses the appname in all these constructed links. I think it should follow the same logic (and use the same parameter) as for the redirects, actually produce something like this expected result:
In two functions of AuthEnforcer - abort_or_redirect and goto_login.
On the other hand, fixing the Submit button in the auth form seems to exceed my skills a bit. It is part of how the Auth APIs are exposed and they all use the appname in their paths by defualt.
Also, after some more looking into the code, there may be also other places, when changes would be required - there are number of places where URLs are constructed. In all those places it should be fixed by:
I run into an issue when trying to migrate my web2py projects into py4web. py4web does not have the
routes.py
which I used befoe to map URLs to applications. I would like to achive the following setup:Lacking
routes.py
, I use nginx as a proxy with something like this (example formydomain1.com
->/myapp1
):I use the following parameter for the Auth, which should help in not using the
appname
in the redirects to Auth actions:For the clarity of following examples, I also use:
This way, the redirect to Auth is done correctly - e.g., when I try to access:
which requires authentication, I get correctly redirected to:
However, the
next
parameter is configured incorrectly:Also, the submit button action is set as:
Notice the two
myapp1
in the URL. All this means that Auth uses theappname
in all these constructed links. I think it should follow the same logic (and use the same parameter) as for the redirects, actually produce something like this expected result:I looked at the Auth code and I figured out how to fix the
next
parameter. It only requires replacing:with the condition:
In two functions of
AuthEnforcer
-abort_or_redirect
andgoto_login
.On the other hand, fixing the Submit button in the auth form seems to exceed my skills a bit. It is part of how the Auth APIs are exposed and they all use the
appname
in their paths by defualt.Also, after some more looking into the code, there may be also other places, when changes would be required - there are number of places where URLs are constructed. In all those places it should be fixed by:
(or something similar).
The text was updated successfully, but these errors were encountered: