Skip to content

Commit

Permalink
Update proxy.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MyBooty165 authored Nov 10, 2024
1 parent 6ae0f68 commit 0b5b7a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/proxy/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ document.addEventListener("DOMContentLoaded", function() {
}

function scancors(link, proxies) {
if (!proxies || proxies.length === 0) {
if (proxies.length === 0) {
link.id = 'fails';
link.style.display = 'none';
console.log('No available CORS proxies for:', link.href);
console.error('No available CORS proxies for:', link.href);
return;
}

if (link.href.startsWith('hhttps')) {
link.href = link.href.replace('hhttps', 'https');
}

const url = localStorage.getItem('corsproxy') || 'https://cors.timmytamle569.workers.dev/' + link.href;
const url = localStorage.getItem('corsproxy') + link.href;

fetch(url, { method: 'GET' })
.then(response => {
Expand Down

0 comments on commit 0b5b7a8

Please sign in to comment.