check method for favicon
Massimo Melina committed
Mar 9, 2025 at 21:49 UTC
520fe5cdf4ab32da434e8731b507a75cb0b8a7f7
1 file changed
+1
-1
src/serveGuiAndSharedFiles.ts
+1
-1
@@ -74,7 +74,7 @@ export const serveGuiAndSharedFiles: Koa.Middleware = async (ctx, next) => {
74
}
75
return
76
}
77
- if (/^\/favicon.ico(\??.*)/.test(ctx.originalUrl) && favicon.get()) // originalUrl to not be subject to changes (vhosting plugin)
77
+ if (/^\/favicon.ico(\??.*)/.test(ctx.originalUrl) && favicon.get() && ctx.method === 'GET') // originalUrl to not be subject to changes (vhosting plugin)
78
return serveFile(ctx, favicon.get())
79
let node = await urlToNode(path, ctx)
80
if (!node)