cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.6k stars 679 forks source link

🚀 Feature Request: add `CF_PAGES` variables to `getPlatformProxy` env #5866

Open dario-piotrowicz opened 4 months ago

dario-piotrowicz commented 4 months ago

Describe the solution

getPlatformProxy doesn't populate the Pages injected environment variables meaning that those are only available in production.

Not finding them locally might confuse people (e.g. https://github.com/cloudflare/next-on-pages/issues/758) and we should always strive for parity between local and prod, so ideally we should add some mocks for such values in getPlatformProxy, similarly to how Astro used to.

Notes/Questions:
petebacondarwin commented 3 months ago

Related to https://github.com/cloudflare/workers-sdk/issues/1440