➕添加对于“/feed/,rss.xml,feed.xml”的支持
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.responses import JSONResponse, HTMLResponse
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
||||
from threading import Lock
|
||||
import logging
|
||||
@ -12,6 +13,14 @@ from friend_circle_lite.get_conf import load_config
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"], # 允许的域
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# 配置APScheduler
|
||||
scheduler = AsyncIOScheduler()
|
||||
scheduler.start()
|
||||
|
Reference in New Issue
Block a user