Why Workers environment variables contain live objects
Apr 1, 2024Kenton Varda

Summary
This post explains the design and security benefits of Cloudflare Workers bindings, which represent live objects (like KV namespaces or service bindings) rather than simple strings. Bindings improve developer experience by reducing boilerplate and enhance security by preventing SSRF attacks and eliminating the need to manage API keys or certificates directly within the Worker code. The post also discusses a legacy caveat regarding Workers running in front of origins and the future introduction of 'origin bindings' to fully mitigate SSRF.