docs
docs copied to clipboard
Clarification needed for enabling previews with Cloudflare
The page src/pages/en/guides/integrations-guide/cloudflare.md mentions that you can enable previews with Wrangler and that "This will allow you run your entire application locally with Wrangler, which supports secrets, environment variables, KV namespaces, Durable Objects and all other supported Cloudflare bindings." However, there is no documentation on how to access these variables that should be injected by Wrangler and accessible when running in Cloudflare Pages. The environment variables and KV namespaces do not seem to be accessible from within Astro. Further insight into how to access these would be very helpful.
Thanks for this feedback, @jimjimovich!
I'm going to tag in @Ekwuno, who recently contributed to this documentation, and ask him to join the discussion to see what more could be included on our end to help with Cloudflare documentation, or to tell us whether this is something handled by Cloudflare's own documentation!
@timfee I hope you don't mind a ping here! I know that you most recently added some helpful node version info to our Cloudflate docs, and I was wondering whether you had any comment on accessing environment variables and KV namespaces within Astro?
I'm not familiar with Cloudflare personally, so I'm not sure whether this is getting into documentation that one would expect to find on Cloudflare's page, maybe re: Wrangler, or whether this is an Astro-specific issue that requires documentation one wouldn't be able to find from Cloudflare. (We obviously try not to hold too much info here when good docs exist at the source, in no small part because of our maintenance costs of keeping updated when things change.)
Thanks for any comment you can provide here!
There have been a few updates to our Cloudflare deploy guide over the past months. Curious if it is still unclear or if we can close this issue?
It seems that the text causing the original confusion was simply removed. Apparently, the Cloudflare adapter does not allow the functionality that was originally advertised.
Thanks for checking @jimjimovich! I guess this is not really a documentation issue then, so I’ll close this for now. I don’t personally have any Cloudflare experience so don’t know exactly what’s needed here, but if there’s still an issue with something not working, an issue in the https://github.com/withastro/astro repo might help get that some visibility.