hollycat
CDCloudflare Developers
•Created by 0x146231489231923 on 11/6/2024 in #workers-help
i feel stupid lol, what do I configure environment variable for dev environment under `wrangler.toml
As per documentation:
For local development with wrangler dev, variables in wrangler.toml are automatically overridden by any values defined in a .dev.vars file located in the root directory of your worker. This is useful for providing values you do not want to check in to source control.
Terminal window
API_HOST = "localhost:4000"
API_ACCOUNT_ID = "local_example_user"
Alternatively, you can specify per-environment values in wrangler.toml and provide an environment value via the env flag when developing locally like so wrangler dev --env=local.
https://developers.cloudflare.com/workers/configuration/environment-variables/
4 replies
CDCloudflare Developers
•Created by hollycat on 11/1/2024 in #workers-help
CORS headers for static assets of a worker in dev
Correct my understanding - if you are on different domain than the worker (regardless of dev or prod), then you can't use static assets without proxying through worker? Please help clarifying this.
2 replies