From 4bb6bc29e3247e217e67c008ae698e300d1d2ecd Mon Sep 17 00:00:00 2001 From: ff2400t <84376771+ff2400t@users.noreply.github.com> Date: Thu, 4 May 2023 18:34:59 +0530 Subject: [PATCH] fix: decode the paths for serve-static (#42) this is already how other adapters work --- src/serve-static.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serve-static.ts b/src/serve-static.ts index c9a3592..6e5bc8e 100644 --- a/src/serve-static.ts +++ b/src/serve-static.ts @@ -22,7 +22,7 @@ export const serveStatic = (options: ServeStaticOptions = { root: '' }) => { } const url = new URL(c.req.url) - const filename = options.path ?? url.pathname + const filename = options.path ?? decodeURI(url.pathname) let path = getFilePath({ filename: options.rewriteRequestPath ? options.rewriteRequestPath(filename) : filename, root: options.root,