Update uv.sw.js
This commit is contained in:
parent
9e5c97f7c7
commit
8269049918
1 changed files with 2 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
importScripts('/uv.bundle.js');
|
importScripts('./uv.bundle.js');
|
||||||
importScripts('/uv.config.js')
|
importScripts('./uv.config.js')
|
||||||
|
|
||||||
const csp = [
|
const csp = [
|
||||||
'cross-origin-embedder-policy',
|
'cross-origin-embedder-policy',
|
||||||
|
|
@ -79,7 +79,6 @@ function UVServiceWorker(bare = '/bare/', options) {
|
||||||
try {
|
try {
|
||||||
return async function handler(event) {
|
return async function handler(event) {
|
||||||
const { request } = event;
|
const { request } = event;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!request.url.startsWith(location.origin + (options.prefix || '/service/'))) {
|
if (!request.url.startsWith(location.origin + (options.prefix || '/service/'))) {
|
||||||
return fetch(request);
|
return fetch(request);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue