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
It worked well but this is super custom and some users have expressed the need of the same feature for their own stac-fastapi instance.
In this repo, we will explore the creation of a starlette Middleware which could be added to any stac-fastapi application. The idea is to intercept the response and then check if f=html or Accept: text/html was provided in the request. If yes, then we encode the response into an HTML document.
Background
in https://github.com/developmentseed/eoapi-devseed we've added custom HTML rendering for the STAC API. This meant re-writing most of the
Client
https://github.com/developmentseed/eoapi-devseed/blob/main/runtimes/eoapi/stac/eoapi/stac/client.py to:f=html
oraccept
headersIt worked well but this is super custom and some users have expressed the need of the same feature for their own stac-fastapi instance.
In this repo, we will explore the creation of a starlette Middleware which could be added to any stac-fastapi application. The idea is to
intercept
the response and then check iff=html
orAccept: text/html
was provided in the request. If yes, then we encode the response into an HTML document.Pros:
Cons:
No OpenAPI advertising (for now)The text was updated successfully, but these errors were encountered: