-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
from fastapi import FastAPI
from secure import Secure
app = FastAPI()
secure_headers = Secure.with_default_headers()
@app.middleware("http")
async def add_security_headers(request, call_next):
response = await call_next(request)
await secure_headers.set_headers_async(response)
return response
@app.get("/")
def read_root():
return {"Hello": "World"}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status