9 lines
217 B
Python
9 lines
217 B
Python
from fastapi import APIRouter, Response
|
|
|
|
router = APIRouter()
|
|
|
|
@router.get("/hello")
|
|
def hello(response: Response):
|
|
response.set_cookie(key="cookie1", value="value1")
|
|
return {"message": "Hello, FastAPI with CORS!"}
|