Skip to content

Commit

Permalink
fixed serve static file when has special character
Browse files Browse the repository at this point in the history
  • Loading branch information
hemedani committed Sep 10, 2024
1 parent 4983ea9 commit 3549134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/serveStatic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const checkFiles = async (req: Request, staticPath: string[]) => {
return isInPath;
};
return checkPath()
? await serveFile(req, `${Deno.cwd()}${url.pathname}`)
? await serveFile(req, `${Deno.cwd()}${decodeURIComponent(url.pathname)}`)
: throwError("can not serve this path");
};

Expand Down

0 comments on commit 3549134

Please sign in to comment.