This commit is contained in:
bietiaop
2025-02-06 20:10:11 +08:00
parent 6a990edb38
commit 11816d038d
3 changed files with 7 additions and 1 deletions

View File

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

View File

@@ -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 {

View File

@@ -23,6 +23,9 @@ const router = Router();
const apiLimiter = rateLimit({
windowMs: 1 * 60 * 1000, // 1分钟内
max: 60, // 最大60个请求
validate: {
xForwardedForHeader: false,
},
});
router.use(apiLimiter);