You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running jetlog behing a reverse proxy and would love to be able to host it under a path prefix, say /jetlog. I tried stripping the prefix before forwarding to the server, but couldn't fix a way to tweak the paths internally generated by the app. For example:
Thank you for opening this issue. This problem lies in the server, so FastAPI. Fortunately FastAPI has a way of handling this, by setting the path prefix for the docs, openapi, and static files and routers:
app=FastApi(docs_url=path_prefix+'/docs',
openapi_url=path_prefix+'/openapi.json')
app.include_router(router, prefix=path_prefix+'/whatever') # done for each routerapp.mount(path_prefix, StaticFiles(...))
That is just a draft of what this change would require, but it's not too hard. A project that uses FastAPI and has done this can be seen here.
Of course we would also need a docker variable to get this prefix from, and its default should be "/" or something. This is also done in the linked project.
I am running jetlog behing a reverse proxy and would love to be able to host it under a path prefix, say
/jetlog
. I tried stripping the prefix before forwarding to the server, but couldn't fix a way to tweak the paths internally generated by the app. For example:should be
Not super familiar with the tech stack, but I'd be happy to create a PR if you could point me where to look. Thanks!
The text was updated successfully, but these errors were encountered: