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
konga
kongaOP8mo ago
Local development works just fine but doesn't work in Preview or Production. It's just undefined.
konga
kongaOP8mo ago
This is in middleware.ts
No description
BrianJM
BrianJM8mo ago
Same problem. Did you find an answer @konga
konga
kongaOP8mo ago
@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!
BrianJM
BrianJM8mo ago
I didn't notice you're using process.env until now. Different problem.
Want results from more Discord servers?
Add your server