New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Support setting APPLICATION_ROOT Flask config #1952
Comments
This comment was marked as abuse.
This comment was marked as abuse.
Is this the same for the 4.6.x beta? |
@muxo771 SimpleLogin doesn't currently support |
I had the same use case requirement to host SImpleLogin not under web server ROOT but another path. I spent a few hours yesterday afternoon to fix the code and achieved it. And today I stumbled upon this issue. Disclaimer I have not done any serious Python programming before, other than being aware of its syntax. I know even less about Flask (didn't hear about it before), and what I did may not be the "right" way.
What I did was simply adjusting the The remaining issues are the HTML templates have mixed references to Then in Once that is all done, SL works as expected. Only a few "routes" are not changed, but they are related to functionality I don't care/need, like OpenID, Paddle, Coinbase, etc. Hope this helps. |
There is a thread on stackoverflow discussing the same issue: (https://stackoverflow.com/questions/67737069/how-to-host-a-flask-app-on-a-subfolder-url-prefix-with-nginx/75123044) One solution seems to be simply as adding a couple new imports and then Another one is adding a new argument to On generating URL, However, as mentioned, quite a few files in the templates are hard coded with I tested |
Problem
I want to use a single NGINX instance and domain to proxy to several backend services with SimpleLogin being one of the backends under a dedicated folder, for example, I'd like to have
example.com/SimpleLogin/Dashboard
serve Simple Login andexample.com/HelloWorld/
to serve my hello world app. Currently SimpleLogin doesn't play nice with this because it will not use the/SimpleLogin/
prefix when generating URLs.Proposed Solution
Update Simple Login to support an optional
APPLICATION_ROOT
setting insimplelogin.env
, and copy the value (when given) to Flask's APPLICATION_ROOT config. Flask will then useAPPLICATION_ROOT
to build URLs.The text was updated successfully, but these errors were encountered: