cloudflare / templates

A collection of starter templates and examples for Cloudflare Workers and Pages
https://cloudflareworkers.com
MIT License
999 stars 632 forks source link

Using a non-global API key for the HTML edge cache? #44

Closed josephrocca closed 1 year ago

josephrocca commented 5 years ago

The instructions for the HTML edge cache use the global Cloudflare API key - I'm wondering whether it's possible to use a zone-specific one for better security? If so, is there any chance the instructions could be updated with the specific permissions required by the token and any extra steps required to use a non-global token?

xtuc commented 4 years ago

Yes, we are planning to use the new API Token, which can have a restricted scope.

lauragift21 commented 1 year ago

I believe it's now possible to restrict your API token to a specific zone. Closing this issue because the templates have moved over to the worker-sdk monorepo: https://github.com/cloudflare/workers-sdk/tree/main/templates.

if you're still experiencing issues feel free to open an issue there.