Pawel
CDCloudflare Developers
•Created by Pawel on 4/9/2025 in #workers-help
How do I set secrets and environment variables for specific environments in the Workers dashboard?
Also the same goes for bindings. If I want to use let's say different D1 database between production and preview I can't do it currently with Workers, but it's possible in Pages.
https://developers.cloudflare.com/workers/static-assets/migrate-from-pages/#preview-environment states that:
Unlike Pages, Workers does not natively support defining different bindings in production vs. non-production builds. This is something we are actively exploring, but in the meantime, you may wish to explore using Wrangler Environments and an appropriate Workers Build configuration to achieve this.so it's seems there is active development to support it
4 replies