Skip to content

Commit d8ee04f

Browse files
fix: pass env and ctx to request handler when using --experimental-public (#1260)
(as reported on discord)
1 parent e61fba8 commit d8ee04f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/tender-tables-fetch.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
fix: pass env and ctx to request handler when using `--experimental-public`

packages/wrangler/templates/static-asset-facade.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default {
3535
} catch (e) {
3636
console.error(e);
3737
// if an error is thrown then serve from actual worker
38-
return worker.fetch(request);
38+
return worker.fetch(request, env, ctx);
3939
// TODO: throw here if worker is not available
4040
// (which implies it may be a service-worker)
4141
}

0 commit comments

Comments
 (0)