mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-23 19:54:18 +01:00
@@ -5,6 +5,7 @@ from fastapi import FastAPI
|
|||||||
from loguru import logger
|
from loguru import logger
|
||||||
from starlette.middleware import Middleware
|
from starlette.middleware import Middleware
|
||||||
from starlette.middleware.base import BaseHTTPMiddleware
|
from starlette.middleware.base import BaseHTTPMiddleware
|
||||||
|
from starlette.middleware.cors import CORSMiddleware
|
||||||
|
|
||||||
from cashu.core.settings import DEBUG, VERSION
|
from cashu.core.settings import DEBUG, VERSION
|
||||||
|
|
||||||
@@ -68,6 +69,8 @@ def create_app(config_object="core.settings") -> FastAPI:
|
|||||||
# Middleware(CustomHeaderMiddleware),
|
# Middleware(CustomHeaderMiddleware),
|
||||||
# ]
|
# ]
|
||||||
|
|
||||||
|
middleware = [Middleware(CORSMiddleware, allow_origins=["*"])]
|
||||||
|
|
||||||
app = FastAPI(
|
app = FastAPI(
|
||||||
title="Cashu Mint",
|
title="Cashu Mint",
|
||||||
description="Ecash wallet and mint with Bitcoin Lightning support.",
|
description="Ecash wallet and mint with Bitcoin Lightning support.",
|
||||||
@@ -76,7 +79,7 @@ def create_app(config_object="core.settings") -> FastAPI:
|
|||||||
"name": "MIT License",
|
"name": "MIT License",
|
||||||
"url": "https://raw.githubusercontent.com/callebtc/cashu/main/LICENSE",
|
"url": "https://raw.githubusercontent.com/callebtc/cashu/main/LICENSE",
|
||||||
},
|
},
|
||||||
# middleware=middleware,
|
middleware=middleware,
|
||||||
)
|
)
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user