mime-sniffing-worker.js (403B)
1 self.addEventListener('fetch', function(event) { 2 // Use an empty content-type value to force mime-sniffing. Note, this 3 // must be passed to the constructor since the mime-type of the Response 4 // is fixed and cannot be later changed. 5 var res = new Response('<!DOCTYPE html>\n<h1 id=\'testid\'>test</h1>', { 6 headers: { 'content-type': '' } 7 }); 8 event.respondWith(res); 9 });