How to ensure that selected root-path prefix is included in the service-desc document #489
-
We deployed STAC-fastapi behind a proxy and followed the uvicorn/fastapi documentation in other to have the URL paths rendered by the application including the selected root path. Basically our application is started with something like the following:
All the links rendered by the application are the ones expected and they can be used to reach the various endpoints supported by the application. The only notable exception is inside the service-desc located under Current
Expected
This omission makes all the potential interactions with the API available inside the Swagger rendering with Any advice on how to achieve this by configuration and/or links to the relevant documentation from the various components (STAC-fastapi/FastAPI/Uvicorn) are more than welcome. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @jfbourgon please check out the planetary computer source code for an example of how to do this, their docs endpoint appears to route to the correct endpoints and Running behind a proxy is common enough it might make sense to pull this into stac-fastapi. |
Beta Was this translation helpful? Give feedback.
Hi @jfbourgon please check out the planetary computer source code for an example of how to do this, their docs endpoint appears to route to the correct endpoints and
Try it out
buttons are working (https://github.com/microsoft/planetary-computer-apis/blob/main/pcstac/pcstac/api.py#L22-L26).Running behind a proxy is common enough it might make sense to pull this into stac-fastapi.