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 authored 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
Original file line number Diff line number Diff line change
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.