添加对于“/feed/,rss.xml,feed.xml”的支持

This commit is contained in:
2024-07-26 19:43:34 +08:00
parent c829c12165
commit aa2a8ec8d4
3 changed files with 37 additions and 6 deletions

View File

@ -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()