mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: #776
This commit is contained in:
@@ -81,6 +81,10 @@ const WebUIConfigCard = () => {
|
||||
onDelete={async () => {
|
||||
try {
|
||||
await FileManager.deleteWebUIFont()
|
||||
toast.success('删除成功')
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
}, 1000)
|
||||
} catch (error) {
|
||||
toast.error('删除失败: ' + (error as Error).message)
|
||||
}
|
||||
|
@@ -47,7 +47,6 @@ export async function InitWebUi(logger: LogWrapper, pathWrapper: NapCatPathWrapp
|
||||
// 如果是webui字体文件,挂载字体文件
|
||||
app.use('/webui/fonts/AaCute.woff', async (_req, res, next) => {
|
||||
const isFontExist = await WebUiConfigWrapper.CheckWebUIFontExist();
|
||||
console.log(isFontExist, 'isFontExist');
|
||||
if (isFontExist) {
|
||||
res.sendFile(WebUiConfigWrapper.GetWebUIFontPath());
|
||||
} else {
|
||||
|
@@ -23,6 +23,9 @@ const router = Router();
|
||||
const apiLimiter = rateLimit({
|
||||
windowMs: 1 * 60 * 1000, // 1分钟内
|
||||
max: 60, // 最大60个请求
|
||||
validate: {
|
||||
xForwardedForHeader: false,
|
||||
},
|
||||
});
|
||||
|
||||
router.use(apiLimiter);
|
||||
|
Reference in New Issue
Block a user