mirror of
https://github.com/p-stream/simple-proxy.git
synced 2026-03-11 17:55:39 +00:00
Merge pull request #3 from movie-web/dev
Remove Defunct code from main.js
This commit is contained in:
commit
545f54ad75
1 changed files with 1 additions and 19 deletions
20
src/main.js
20
src/main.js
|
|
@ -4,16 +4,6 @@ const corsHeaders = {
|
||||||
'Access-Control-Max-Age': '86400',
|
'Access-Control-Max-Age': '86400',
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const allowedDomains = [
|
|
||||||
'https://v2.sg.media-imdb.com',
|
|
||||||
'https://gomo.to',
|
|
||||||
'https://lookmovie.io',
|
|
||||||
'https://gomoplayer.com',
|
|
||||||
'https://api.opensubtitles.org',
|
|
||||||
'https://www.vmovee.watch',
|
|
||||||
];
|
|
||||||
|
|
||||||
async function handleRequest(request, destinationUrl, iteration = 0) {
|
async function handleRequest(request, destinationUrl, iteration = 0) {
|
||||||
console.log(
|
console.log(
|
||||||
`PROXYING ${destinationUrl}${
|
`PROXYING ${destinationUrl}${
|
||||||
|
|
@ -133,15 +123,7 @@ addEventListener('fetch', (event) => {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
} else if (
|
||||||
// else if (!allowedDomains.find(domain => destinationUrl.startsWith(domain))) {
|
|
||||||
// event.respondWith(
|
|
||||||
// new Response('404 Not Found', {
|
|
||||||
// status: 404,
|
|
||||||
// }),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
else if (
|
|
||||||
request.method === 'GET' ||
|
request.method === 'GET' ||
|
||||||
request.method === 'HEAD' ||
|
request.method === 'HEAD' ||
|
||||||
request.method === 'POST'
|
request.method === 'POST'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue