diff --git a/cashu/mint/app.py b/cashu/mint/app.py index a0c572e..2dc64d9 100644 --- a/cashu/mint/app.py +++ b/cashu/mint/app.py @@ -5,6 +5,7 @@ from fastapi import FastAPI from loguru import logger from starlette.middleware import Middleware from starlette.middleware.base import BaseHTTPMiddleware +from starlette.middleware.cors import CORSMiddleware from cashu.core.settings import DEBUG, VERSION @@ -68,6 +69,8 @@ def create_app(config_object="core.settings") -> FastAPI: # Middleware(CustomHeaderMiddleware), # ] + middleware = [Middleware(CORSMiddleware, allow_origins=["*"])] + app = FastAPI( title="Cashu Mint", description="Ecash wallet and mint with Bitcoin Lightning support.", @@ -76,7 +79,7 @@ def create_app(config_object="core.settings") -> FastAPI: "name": "MIT License", "url": "https://raw.githubusercontent.com/callebtc/cashu/main/LICENSE", }, - # middleware=middleware, + middleware=middleware, ) return app