Skip to content

Instantly share code, notes, and snippets.

@timkelty
Last active May 21, 2025 14:20
Show Gist options
  • Save timkelty/53bf5fdf730a3955f3b9e89c734b10b1 to your computer and use it in GitHub Desktop.
Save timkelty/53bf5fdf730a3955f3b9e89c734b10b1 to your computer and use it in GitHub Desktop.
export default {
async fetch(request): Promise<Response> {
const originRequest = new Request('https://myproxy.com', request);
const originResponse = await fetch(originRequest, {
cf: {
cacheEverything: true,
},
});
// cacheTag will be null, even though the response from the origin server sent it
const cacheTag = originResponse.headers.get("Cache-Tag");
return originResponse;
},
} satisfies ExportedHandler;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment