19 lines
No EOL
509 B
JavaScript
19 lines
No EOL
509 B
JavaScript
importScripts("/libcurl/index.js");
|
|
importScripts("/epoxy/index.js");
|
|
importScripts("/bare_transport.js");
|
|
importScripts("/uv/uv.bundle.js");
|
|
importScripts("/uv.config.js");
|
|
importScripts(__uv$config.sw);
|
|
|
|
const uv = new UVServiceWorker();
|
|
|
|
self.addEventListener("fetch", (event) => {
|
|
event.respondWith(
|
|
(async () => {
|
|
if (event.request.url.startsWith(location.origin + __uv$config.prefix)) {
|
|
return await uv.fetch(event);
|
|
}
|
|
return await fetch(event.request);
|
|
})()
|
|
);
|
|
}); |