cors fixes

This commit is contained in:
2026-06-16 17:50:36 +05:30
parent 85aac955ac
commit d4b64d630a
8 changed files with 18 additions and 97 deletions

View File

@@ -26,7 +26,6 @@ Example:
"""
from openapi_first.app import OpenAPIFirstApp
from starlette_csrf import CSRFMiddleware
import routes
app = OpenAPIFirstApp(
@@ -34,13 +33,3 @@ app = OpenAPIFirstApp(
routes_module=routes,
title="Model CRUD Example Service",
)
app.add_middleware(
CSRFMiddleware,
secret="change-me-in-production",
cookie_name="csrftoken",
header_name="x-csrftoken",
cookie_secure=False,
cookie_httponly=False,
cookie_samesite="lax",
)