-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
URL Prefix Superset Flask #3690
Comments
I meet the same problem |
👍 |
@geekSnails +1 |
+1 |
basically, no This PR was closed after 3 months... Sad. |
Hi, I am also having the same issue. I tried to fix it using Blurprints but superset doesn't seem to take into consideration blueprints with url_prefix. The main reason the need for me is I am trying to deploy superset on AWS Lambda on a serverless environment and since AWS API Gateway adds a stage name like '/dev' all the links are broken. I am able to get to the login page but most of them doesn't work because it seems it's trying to access resources at "/" but API Gateway puts all of them at "/dev". Any other way or do we need to modify all the static URL's? Can you help me to see if someone can get Blueprints working on superset with url_prefix option? Thanks |
Just a feedback here. |
Hi all, i have been working on the same issue for a while and i have some suggestions,
as you can see you need to match all the hard codded path that are being redirected to the default root context ('/'). i will say this is ugly. There might be some further modifications in these paths which make the maintenance not very interesting.
this is working well as long as all the paths start with /superset, but because there are many other paths that does you have to match all of them like mentioned above. Even if it will still be hard coded at least it will make the workaround much easy to maintain and reliable. 2- And the second which might be less easier but good for long term is to define a global parameter configuration in the config file like (URL_PREFIX), which should be added as base path to all the routes, then get rid of the hard coded URL. Thanks. |
@pandamien I've attempted your first option to configure as below;
but i just end up with endless redirect as; Have I missed something obvious? This is with NGINX |
Theres an interesting looking option on Stackoverflow which I'm trying to set up |
Hi, I wanted to run 'Superset' in complete serverless environment on AWS. Basically, want to run superset on AWS Lambda. I have tried different methods recommended and all of them resulted in some or other place break of functionality. Eventually what i did was the below to make it work:
After above all are done, I have used AWS Aurora Serverless as my metadata database. This way I don't even need to pay for the database since Aurora is MySQL version. Hope this helps. Once i fix up the remaining this, I need to check how to make this available to all. -- No more nginx or other links. We don't even need gunicorn in this setup. Thanks |
@kirankumarpv I'd be very interested in an update on this as I was about to attempt the same thing. |
All the fixes has been done and tested. Everything working fine on Local. On AWS Lambda "Upload CSV to Database" is not working because it cannot write to /static folder. For my use case, I don't really need to use "upload CSV to Database" function. So, I am not going to put effort to fix it as of now. But, ideally if you are running locally on any server on any endpoint other than '/', my fix should perfectly work fine. |
Hi, Can anyone help me to make a pull request for this particular issue so that i can merge the code? Thanks |
I am facing the same problem. |
I have tried that. Using wsgi middleware to catch redirection reponse and dirty patch location HEADER but that results in sometimes application going to indefinite multiple redirects |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
Hi Kirankumar, I was seeing you comments on your success of implementing Superset on AWS Lambda. I was struggling to get any literature for doing the same. Can you please guide me to do this. Regards, |
Can this be reopened as a feature request? we would like to use it but not able to run it on a subpath /superset makes it impossible to use it in our environment. I have been able to run it using the helm chart but not being able to run a subpath makes it a non starter for me. |
Hi Team, Do we have fix for this issue in latest 0.36 version? Thanks. |
Hello @thammaneni, |
I forked and opened a new branch to support URL Prefix by |
Any updates on this? |
+1, this is a very useful feature. @cdmikechen does this still work the latest release of superset? |
@mrgokul You can look at this apache-superset/superset-roadmap#105 |
Is it possible to use Nginx to rewrite the URL using latest Superset? |
Awaiting your PR! |
I had the same issue. I had to add url prefix to all routes in python and js files. The patched Superset version is here https://github.com/andrey-mikhailov/superset-custom-path |
Hi @andrey-mikhailov , Any chance you can create a PR for (the fix after running your script) and ask an admin to approve? |
Superset community will never accept this implementation, custom url path should be done in more robust way |
I would be fine, at least, if all sub-pages have /superset prefix. Currently, it's very inconsistent. |
Its a shame that this is not possible. I set up superset, everything is great and now i need to stick to something else as i cant integrate it into our app. |
FWIW, I'm sure the community is open to review a PR that adds this functionality. |
@villebro Hi~ where is the PR? I want to see it~ |
The issue identified, years ago, is hard coded urls in the code (https://github.com/apache/superset/blob/master/superset/views/core.py#L297). |
@cdmikechen to rephrase, if this feature is important for the community, feel free to open a PR that adds the functionality. But keep in mind: for it to get merged it needs to be of high quality in general (abide to best practices generally recommended by the used libraries/frameworks) and include good tests. |
By setting up ADDITIONAL_MIDDLEWARE it working for some routes, for statics need to bypass it. |
I tried reverse proxy with sub_filter. I haven't checked that all the rules have been added, but most of them seem to work. |
Thanks @MsKimm , it definitly works with docker, but tried to make it work using manual install with gunicorn / superset in an env, somehow it works, but referer and links in the page doesnt get rewritten. Any idea what could cause that? |
Is there nginx in front? If so, there doesn't seem to be difference between manual installation and docker. |
You literally save my life, in next days I will try all routes and add what is missing, right now I can confirm that your solution is the only one working with the application subpath configuration. |
Thanks a lot!!! |
Is there a possibility that a similar approach could work for Apache? I'm having issues setting up httpd.conf in a way similar to what you propose here. |
Make sure these boxes are checked before submitting your issue - thank you!
Superset version
superset-0.20.4
Expected results
Want to run superset on http://127.0.0.1:8088/analytics/ , currently it runs on http://127.0.0.1:8088. Although, I understand this is not a bug but there should be a way in configuration file (config.py) to change url_prefix. When I am moving my superset installation to Production, I would prefer to keep it behind the proxypass of apache and not expose it directly on /.
Actual results
I couldn't find any option in config file to change the url_prefix in flask.
Steps to reproduce
Its a default setting. Need an option in config file or a procedure to add url_prefix.
Thanks
The text was updated successfully, but these errors were encountered: