Skip to content

Commit

Permalink
fix Unicode filenames #27
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Jun 2, 2023
1 parent a6498a3 commit 72751c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export function FileSystem({ prefix, path, fs, mime }) {
return async function(req, res, next) {
const method = req.method;
const url = new URL(req.url);
let path_name = normalize_url(url.pathname);
let path_name = normalize_url(decodeURIComponent(url.pathname));
if (path_name.startsWith(prefix)) {
if (req.method !== 'GET') {
return res.send('Method Not Allowed', { status: 405 });
Expand Down

0 comments on commit 72751c2

Please sign in to comment.