fix: decode static file paths (#2642)

Fixes #2613
This commit is contained in:
Felix
2024-09-06 10:49:07 +02:00
committed by GitHub
parent 03ef0e5347
commit 126f492ea0
2 changed files with 25 additions and 1 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ export function staticFiles<T>(): MiddlewareFn<T> {
const { req, url, config } = ctx;
const buildCache = getBuildCache(ctx);
let pathname = url.pathname;
let pathname = decodeURIComponent(url.pathname);
if (config.basePath) {
pathname = pathname !== config.basePath
? pathname.slice(config.basePath.length)