🔒️ Fix CORS allowed origins and methods
This commit is contained in:
@@ -34,13 +34,12 @@ app = FastAPI(lifespan=lifespan)
|
|||||||
|
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=["https://localhost:4443", "https://localhost:3000"],
|
allow_origins=["http://carrramba.adrien.run", "https://carrramba.adrien.run"],
|
||||||
allow_credentials=True,
|
allow_credentials=True,
|
||||||
allow_methods=["*"],
|
allow_methods=["OPTIONS", "GET"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# The cache-control header entry is not managed properly by fastapi-cache:
|
# The cache-control header entry is not managed properly by fastapi-cache:
|
||||||
# For now, a request with a cache-control set to no-cache
|
# For now, a request with a cache-control set to no-cache
|
||||||
# is interpreted as disabling the use of the server cache.
|
# is interpreted as disabling the use of the server cache.
|
||||||
|
Reference in New Issue
Block a user