allow cors

This commit is contained in:
callebtc
2023-01-15 10:03:37 +01:00
parent 56e78de78a
commit f2327409c4

View File

@@ -69,15 +69,23 @@ def create_app(config_object="core.settings") -> FastAPI:
# Middleware(CustomHeaderMiddleware),
# ]
middleware = [Middleware(CORSMiddleware, allow_origins=["*"])]
middleware = [
Middleware(
CORSMiddleware,
allow_origins=["*"],
allow_methods=["*"],
allow_headers=["*"],
expose_headers=["*"],
)
]
app = FastAPI(
title="Cashu Mint",
description="Ecash wallet and mint with Bitcoin Lightning support.",
title="Cashu Python Mint",
description="Ecash wallet and mint for Bitcoin",
version=VERSION,
license_info={
"name": "MIT License",
"url": "https://raw.githubusercontent.com/callebtc/cashu/main/LICENSE",
"url": "https://raw.githubusercontent.com/cashubtc/cashu/main/LICENSE",
},
middleware=middleware,
)