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 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user