Debian Codegraph @

docs_src/behind_a_proxy/tutorial001_py310.py

raw
1 from fastapi import FastAPI, Request
2
3 app = FastAPI()
4
5
6 @app.get("/app")
7 def read_main(request: Request):
8 return {"message": "Hello World", "root_path": request.scope.get("root_path")}