How can I serve superset under reverse proxy custom routes? #23156
Replies: 3 comments 1 reply
-
I am facing an issue curl http://localhost/superset -> http://localhost/dashboard/list curl http://localhost/superset/dashboard/list -> http://localhost/dashboard/list I am running apache superset at http://localhost/superset as reverse proxy on nginx |
Beta Was this translation helpful? Give feedback.
-
I'm facing the same issue, I tried to implement several workaround and failed to correctly rewrite every paths, especially API calls. class PrefixMiddleware(object):
def __init__(self, app, prefix='/superset'):
self.app = app
self.prefix = prefix
def __call__(self, environ, start_response):
if environ['PATH_INFO'].startswith(self.prefix):
environ['PATH_INFO'] = environ['PATH_INFO'][len(self.prefix):]
environ['SCRIPT_NAME'] = self.prefix
return self.app(environ, start_response)
else:
start_response('404', [('Content-Type', 'text/plain')])
return ["This url does not belong to the app.".encode()]
ADDITIONAL_MIDDLEWARE = [PrefixMiddleware, ] I also rewrote some hard-coded paths on reverse-proxy side but I failed to rewrite hard-coded paths included in the javascript assets. |
Beta Was this translation helpful? Give feedback.
-
Since I am also interested in this feature, I have included links to all relevant issues, pull requests, and discussions. So far, it appears that only subdomains are supported with Nginx. For more details, see this comment: #1866 (comment) and #1866 (comment) Related Issues: Related Pull Requests: Related Discussions: |
Beta Was this translation helpful? Give feedback.
-
We want to run all superset services under http://host/analytics. But as of right now, all requests are redirected to http://host/superset. Require assistance on this.
Beta Was this translation helpful? Give feedback.
All reactions