Skip to content

Commit

Permalink
Merge pull request #176 from hemedani/main
Browse files Browse the repository at this point in the history
fixed serve static file when has special character
  • Loading branch information
hemedani authored Sep 10, 2024
2 parents fc46fbe + 66f001b commit 03ad658
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 03ad658

Please sign in to comment.