Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit de4f149

Browse files
committed
Merge branch 'master' of https://github.com/alephjs/aleph.js
2 parents b35809c + db4e003 commit de4f149

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function start(appDir: string, hostname: string, port: number, isDe
1717
log.info(`Server ready on http://${hostname}:${port}`)
1818
for await (const req of s) {
1919
const url = new URL('http://localhost/' + req.url)
20-
const pathname = util.cleanPath(url.pathname)
20+
const pathname = util.cleanPath(decodeURI(url.pathname))
2121
const resp = new Request(req, pathname, {}, url.searchParams)
2222

2323
try {
@@ -64,7 +64,7 @@ export async function start(appDir: string, hostname: string, port: number, isDe
6464
}
6565

6666
// serve public files
67-
const filePath = path.join(project.appRoot, 'public', decodeURI(pathname))
67+
const filePath = path.join(project.appRoot, 'public', pathname)
6868
if (existsFileSync(filePath)) {
6969
const info = Deno.lstatSync(filePath)
7070
const lastModified = info.mtime?.toUTCString() ?? new Date().toUTCString()

0 commit comments

Comments
 (0)