From f2327409c403afd8d3d4c87817952142e0419065 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Sun, 15 Jan 2023 10:03:37 +0100 Subject: [PATCH] allow cors --- cashu/mint/app.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/cashu/mint/app.py b/cashu/mint/app.py index 2dc64d9..d4594cc 100644 --- a/cashu/mint/app.py +++ b/cashu/mint/app.py @@ -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, )