gja / cloudflare-worker-local

Run a Cloudflare Worker Locally

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set cf config values in request headers

rita-liu opened this issue · comments

Cloudflare worker allows controlling cache via a cf object. Proposing a PR to expose this object into request headers. Unit tests can then check if cache rules are set correctly by checking against these headers.

Reference: https://developers.cloudflare.com/workers/recipes/vcl-conversion/controlling-the-cache/