blob: 0315bde4809321f5a8dde5104b5edb13ae691894 [file] [log] [blame]
import time
script = '''
// Time stamp: %s
// (This ensures the source text is *not* a byte-for-byte match with any
// previously-fetched version of this script.)
self.addEventListener("fetch", async (event) => {
if (event.request.url.indexOf("mouse") !== -1)
event.respondWith(new Response("cat"));
});'''
def main(request, response):
return [('Content-Type', 'application/javascript'), ('Cache-Control', 'np-cache, no-store')], script % time.time()