79771839

Date: 2025-09-22 16:22:26
Score: 1
Natty:
Report link

This happens when you have a proxy in front of you FastAPI.

FastAPI expects you to have the docs at the root of your URL

If the URL for the FastAPI is https://www.example.com/example/api/

add:

app = FastAPI(
    root_path="/example/api/"
)

This way https://www.example.com/example/api/docs will work

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Nyx Raposo