Revert "🐛 WebUI初始化逻辑修改 (#1574)" (#1577)

This reverts commit 65a6f608e6.
This commit is contained in:
AkashiCoin
2024-08-26 12:09:04 +08:00
committed by GitHub
parent b44332121a
commit 073cab5a85
2 changed files with 14 additions and 9 deletions
+14
View File
@@ -1,7 +1,21 @@
import nonebot
from fastapi.middleware.cors import CORSMiddleware
from pydantic import BaseModel
from strenum import StrEnum
app = nonebot.get_app()
origins = ["*"]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
AVA_URL = "http://q1.qlogo.cn/g?b=qq&nk={}&s=160"
GROUP_AVA_URL = "http://p.qlogo.cn/gh/{}/{}/640/"