mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-06-03 14:50:46 +08:00
build:完成打包功能
This commit is contained in:
@@ -45,9 +45,15 @@ async def lifespan(app: FastAPI):
|
|||||||
yield
|
yield
|
||||||
|
|
||||||
app = create_app(lifespan=lifespan)
|
app = create_app(lifespan=lifespan)
|
||||||
|
origins = [
|
||||||
|
"http://localhost",
|
||||||
|
"http://127.0.0.1",
|
||||||
|
"http://tauri.localhost",
|
||||||
|
]
|
||||||
|
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=["tauri://localhost"], # 加上 Tauri 的 origin
|
allow_origins=origins, # 加上 Tauri 的 origin
|
||||||
allow_credentials=True,
|
allow_credentials=True,
|
||||||
allow_methods=["*"],
|
allow_methods=["*"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
|
|||||||
Reference in New Issue
Block a user