Last active
May 21, 2025 14:20
-
-
Save timkelty/53bf5fdf730a3955f3b9e89c734b10b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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