Skip to content

Commit

Permalink
Fix next server serving unicode files
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle committed Aug 12, 2021
1 parent dad7014 commit c74923c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/next/server/next-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,11 @@ export default class Server {
pathParts.splice(0, basePathParts.length)
}

const path = `/${pathParts.join('/')}`
let path = `/${pathParts.join('/')}`

if (!publicFiles.has(path)) {
path = encodeURI(path)
}

if (publicFiles.has(path)) {
await this.serveStatic(
Expand Down

0 comments on commit c74923c

Please sign in to comment.