Update CFWorkers.js
parent
11e75eec03
commit
c4c2c20bce
25
CFWorkers.js
25
CFWorkers.js
|
@ -19,19 +19,20 @@ addEventListener('fetch', event => {
|
||||||
url.protocol = 'https:'
|
url.protocol = 'https:'
|
||||||
response = Response.redirect(url.href);
|
response = Response.redirect(url.href);
|
||||||
event.respondWith( response );
|
event.respondWith( response );
|
||||||
}
|
|
||||||
let nd = new Date();
|
|
||||||
if (nd.getDate()%2) {
|
|
||||||
host = SingleDay
|
|
||||||
} else {
|
} else {
|
||||||
host = DoubleDay
|
let nd = new Date();
|
||||||
}
|
if (nd.getDate()%2) {
|
||||||
if (!CFproxy) {
|
host = SingleDay
|
||||||
url.hostname=host;
|
} else {
|
||||||
let request=new Request(url,event.request);
|
host = DoubleDay
|
||||||
event.respondWith( fetch(request) )
|
}
|
||||||
} else {
|
if (!CFproxy) {
|
||||||
event.respondWith( fetchAndApply(event.request) );
|
url.hostname=host;
|
||||||
|
let request=new Request(url,event.request);
|
||||||
|
event.respondWith( fetch(request) )
|
||||||
|
} else {
|
||||||
|
event.respondWith( fetchAndApply(event.request) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue