Url web prefix
prin-it opened this issue · 4 comments
prin-it commented
Hi! Can you add url prefix in saq position arguments for run web behind proxy?
tobymao commented
sorry, i don't know what that means, can you explain more?
prin-it commented
I use docker compose with traefik proxy. The Web does not run on the root url like site.com . It is necessary to run web applications with the url prefix like site.com/dashboard . Web app (js code) does not know about this prefix and sends requests to the root path (site.com ). You need to make changes to the routes and js code. Is it possible? Thanks!
app.add_routes(
[
web.static("/static", static, append_version=True),
web.get("/api/queues/{queue}/jobs/{job}", jobs),
web.post("/api/queues/{queue}/jobs/{job}/retry", retry),
web.post("/api/queues/{queue}/jobs/{job}/abort", abort),
web.get("/api/queues", queues_),
web.get("/api/queues/{queue}", queues_),
web.get("/", views),
web.get("/queues/{queue}", views),
web.get("/queues/{queue}/jobs/{job}", views),
web.get("/health", health),
]
)
tobymao commented
i think the suggested approach would be to configure the proxy to rewrite to the url needed.
thanks for the report, but i think this is out of scope
prin-it commented
Ok. I just will open additional port on server for dashboard.