dont work on cf
This commit is contained in:
@ -57,9 +57,13 @@ async function caching() {
|
||||
if(sessionStorage.getItem("cdns")) return "done";
|
||||
let cdns = JSON.parse(atob("WyJodHRwczovL2NhY2hpbmcuZnJlZXRscy5mYXN0bHkubmV0IiwiaHR0cHM6Ly9jYWNoaW5nLmdsb2JhbC5zc2wuZmFzdGx5Lm5ldCJd"));
|
||||
let goods = [];
|
||||
let cfStatus = (await fetch("/alive.txt")).headers.get("Cf-Ray") != null;
|
||||
if(cfStatus) {
|
||||
localStorage.setItem("selenite.disableCDN", "true");
|
||||
return;
|
||||
}
|
||||
for(let i = 0;i<cdns.length;i++) {
|
||||
let cdn = cdns[i];
|
||||
// TODO: change to alive.txt
|
||||
await fetch(cdn + "/alive.txt")
|
||||
.then(data => data.text())
|
||||
.then(data => {
|
||||
|
||||
Reference in New Issue
Block a user