fix: logo not showing with ACCESS_KEY (#14722)

This commit is contained in:
Tony 2024-03-09 00:09:34 +08:00 committed by GitHub
parent 1762692914
commit 7641e7dd29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ const middleware: MiddlewareHandler = async (ctx, next) => {
const accessKey = ctx.req.query('key');
const accessCode = ctx.req.query('code');
if (requestPath === '/' || requestPath === '/robots.txt') {
if (requestPath === '/' || requestPath === '/robots.txt' || requestPath === '/favicon.ico' || requestPath === '/logo.png') {
await next();
} else {
if (config.accessKey && !(config.accessKey === accessKey || accessCode === md5(requestPath + config.accessKey))) {