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
cc @jjfrench since you worked on the custom domain name PR!
The set up for the ingestor is as follows :
one lambda is deployed as an "API handler", integrated to an API gateway REST API. It's the entry point for the ingestion execution, and the FastAPI application is defined and deployed in that lambda. The handler file imports our custom FastAPI application.
In (1), we allow for a root_path in the configuration, in cases e.g. where we want to define different stages in our proxy. With the current set up, all is well if we integrate (1) with an API gateway REST API as proxy.
However, if on top of that we map that REST API to a custom domain name, I noticed that the /docs endpoint is inaccessible. More specifically, it returns something like this :
I noticed that doing this solves the problem, but I am not sure to understand 100% why yet. [Taken from here]. The solution is, in the handler in (1), to pass to the Mangum constructor's api_gateway_base_path parameter the value of root_path.
Like this :
from mangum import Mangum
from .main import app
handler = Mangum(app, lifespan="off", api_gateway_base_path=app.root_path) # or something like that if the root path is exposed
The content you are editing has changed. Please copy your edits and refresh the page.
cc @jjfrench since you worked on the custom domain name PR!
The set up for the ingestor is as follows :
In (1), we allow for a
root_path
in the configuration, in cases e.g. where we want to define different stages in our proxy. With the current set up, all is well if we integrate (1) with an API gateway REST API as proxy.However, if on top of that we map that REST API to a custom domain name, I noticed that the
/docs
endpoint is inaccessible. More specifically, it returns something like this :I noticed that doing this solves the problem, but I am not sure to understand 100% why yet. [Taken from here]. The solution is, in the handler in (1), to pass to the
Mangum
constructor'sapi_gateway_base_path
parameter the value ofroot_path
.Like this :
Tasks
The text was updated successfully, but these errors were encountered: