-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Closed
Labels
Description
First Check
- I added a very descriptive title to this issue.
- I used the GitHub search to find a similar issue and didn't find it.
- I searched the FastAPI documentation, with the integrated search.
- I already searched in Google "How to X in FastAPI" and didn't find any information.
- I already read and followed all the tutorial in the docs and didn't find an answer.
- I already checked if it is not related to FastAPI but to Pydantic.
- I already checked if it is not related to FastAPI but to Swagger UI.
- I already checked if it is not related to FastAPI but to ReDoc.
Commit to Help
- I commit to help with one of those options 👆
Example Code
@app.get("/source")
async def source():
headers = {"Authorization": "Nothing"}
return RedirectResponse(app.url_path_for("target"), headers=headers)
@app.get("/target")
async def target():
return {"token": "Target"}Description
I want to redirect to a target (main page) after login (source). The target needs to see the Authorization header so I add it just before redirecting. However, the header is not reflected when serving request at target.
I searched all over but could not find a solution to this.
Operating System
Linux
Operating System Details
Ubuntu 20.4
FastAPI Version
0.68.1
Python Version
3.8.10
Additional Context
No response
Reactions are currently unavailable