Skip to content

Commit 456c177

Browse files
committed
fix: enabling resolution of paths that are encoded, so we can resolve %20
1 parent 6920e86 commit 456c177

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/worker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ router.all('*', async (req: Request, env: Env, ctx: ExecutionContext) => {
5555
// This will map `/x` to `/x/index.html`, if `/x` does not exist.
5656
// This is conventional for HTTP servers.
5757
mapRequestToAsset: mapRequestToDocs,
58+
pathIsEncoded: true,
5859
cacheControl,
5960
ASSET_NAMESPACE: env.__STATIC_CONTENT,
6061
ASSET_MANIFEST: assetManifest,
@@ -78,6 +79,7 @@ router.all('*', async (req: Request, env: Env, ctx: ExecutionContext) => {
7879
// Map request to 404.html page.
7980
return new Request(`${new URL(req.url).origin}/404.html`, req);
8081
},
82+
pathIsEncoded: true,
8183
cacheControl,
8284
ASSET_NAMESPACE: env.__STATIC_CONTENT,
8385
ASSET_MANIFEST: assetManifest,

0 commit comments

Comments
 (0)