Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const HEADERS = [
addEventListener('fetch', event => {
* Respond to the request
* @param {Request} request
async function handleRequest(request) {
let response = await fetch(request.url)
let ct = response.headers.get('content-type')
if (typeof(ct) == "string" && !ct.includes("text/html")) {
response = new Response(response.body,response) => response.headers.delete(h))
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.