-
Notifications
You must be signed in to change notification settings - Fork 3k
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 feature for web UI? #149
Comments
Hi! I think we should provide some way of doing this. Until it's implemented, my recommendation would be to setup the proxying to use a sub-domain for exposing the web ui. I tried to come up with a hackish way to do it with the currently released version. Putting the following in your locustfile will expose all of the web UI's endpoints under a prefix path: from locust import web
from werkzeug.wsgi import DispatcherMiddleware
web.app = DispatcherMiddleware(web.app, {"/locust": web.app}) However, I realised that we use hard-coded absolute URL's in the front-end, so unfortunately it won't work. |
Thanks! I ended up adding a dedicated port on our apache server to do ssl termination and proxy through to the back end, so this will work for us. I'll leave this open though so that it's tracked in the issues section, in case others want it. |
Similar problem when trying to expose locust UI via Kubernetes' ingress. |
Hi,
Is it possible to add a --url-prefix option for the web ui, so that proxy setups can run the web ui under a sub-url? We want to run locust proxied behind our https server, which proxies other services like @Jahaja 's ps-dash, and to do this requires any assets being loaded to be fetched either relative to "./" or full-pathed under a known prefix.
Thanks,
Jeff
The text was updated successfully, but these errors were encountered: