Build configuration · Cloudflare Pages d...
Can you access environment variables during runtime in Cloudflare Pages?
This only refers to environment variables for build time
https://developers.cloudflare.com/pages/configuration/build-configuration/#environment-variables
Cloudflare Docs
Build configuration · Cloudflare Pages docs
You may tell Cloudflare Pages how your site needs to be built as well as where its output files will be located.
5 Replies
Local development works just fine but doesn't work in Preview or Production. It's just undefined.
This is in middleware.ts
Same problem. Did you find an answer @konga
@BrianJM no I haven't. I just switched to docker and running on fly.io. If you can figure it out that would be awesome!
I didn't notice you're using
process.env
until now. Different problem.