Skip to content

Commit

Permalink
fix: decode path correctly (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jul 15, 2023
1 parent 1340e06 commit e883c15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware.ts
Expand Up @@ -254,7 +254,7 @@ export function serveStaticCopyMiddleware(
let pathname = parse(req).pathname
if (pathname.includes('%')) {
try {
pathname = decodeURIComponent(pathname)
pathname = decodeURI(pathname)
} catch (err) {
/* malform uri */
}
Expand Down

0 comments on commit e883c15

Please sign in to comment.