Merge pull request #4 from JamesHawkinss/master-2

Fix merge conflicts
This commit is contained in:
mrjvs 2022-05-01 16:44:27 +02:00 committed by GitHub
commit 40e9583832
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1625 additions and 1558 deletions

View file

@ -9,7 +9,8 @@ const allowedDomains = [
'https://gomo.to',
'https://lookmovie.io',
'https://gomoplayer.com',
'https://api.opensubtitles.org'
'https://api.opensubtitles.org',
'https://www.vmovee.watch'
];
async function handleRequest(request, destinationUrl, iteration = 0) {
@ -48,7 +49,7 @@ async function handleRequest(request, destinationUrl, iteration = 0) {
// Set CORS headers
response.headers.set("Access-Control-Allow-Origin", '*');
response.headers.set('Access-Control-Expose-Headers', 'PHPSESSID');
response.headers.set('Access-Control-Expose-Headers', '*');
// Get and set PHPSESSID cookie
const cookies = response.headers.get('Set-Cookie');
@ -112,13 +113,13 @@ addEventListener("fetch", event => {
}),
);
}
else if (!allowedDomains.find(domain => destinationUrl.startsWith(domain))) {
event.respondWith(
new Response('404 Not Found', {
status: 404,
}),
);
}
// else if (!allowedDomains.find(domain => destinationUrl.startsWith(domain))) {
// event.respondWith(
// new Response('404 Not Found', {
// status: 404,
// }),
// );
// }
else if (request.method === "GET" || request.method === "HEAD" || request.method === "POST") {
// Handle request
event.respondWith(handleRequest(request, destinationUrl));

3164
yarn.lock

File diff suppressed because it is too large Load diff