Replies: 9 comments
-
I tried to edit root_path according to this doc: |
Beta Was this translation helpful? Give feedback.
-
In what kind of service are you running this app? I see it is redirecting to an http endpoint (rather than a https) so there might be an issue with that? You could try adding the httpsredirect middleware to your application, but that is just guessing on my part to be honest.. |
Beta Was this translation helpful? Give feedback.
-
I'm building an authorization service based on casbin lib.
I still don't know why its redirecting to this anw, Updated: |
Beta Was this translation helpful? Give feedback.
-
Thanks, but when I follow the suggested solution, I encountered another 403 error: |
Beta Was this translation helpful? Give feedback.
-
I have internal redirect in AWS lambda+mangum+fastAPI But locally everything is working fine. I did a lot of debugging. 307 comes from fast API, not Mangum. To exactly the same URL, it is asking to. |
Beta Was this translation helpful? Give feedback.
-
+1 looking to solve this |
Beta Was this translation helpful? Give feedback.
-
Any progress on this? |
Beta Was this translation helpful? Give feedback.
-
I see the same issue. Configuring a reverse proxy on fast api to check for x-forwarded-proto and setting preferred scheme to http (which is the value sent by the ALB on the proto header) does not help. This solution worked for Flask, but Fast API seems to not take the scheme into account. |
Beta Was this translation helpful? Give feedback.
-
First Check
Commit to Help
Example Code
Description
It's okay to access swagger UI when I run my app locally. However, when I hosted my app in an AWS instance, I cannot access swagger UI. My logged response when using curl from my laptop is:
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.75.0
Python Version
3.8.8
Additional Context
Updated:
I tried the following config, at least I was able to get to the swagger page but it couldn't found the openapi.json . I turn on the developer mode on my browser (Firefox/Ubuntu) and see a 404 in the request for openapi.json
Here is the error message:
P/s:
curl -v GET http://localhost:my_port/my_api_prefix/openapi.json
then I was able to get the json definition normally, so I guess this related to network config or some flags inside FastAPINo response
Beta Was this translation helpful? Give feedback.
All reactions