fixes
This commit is contained in:
parent
f56d4dbbb3
commit
bee3292088
@ -45,11 +45,21 @@ export const post: RequestHandler = async (event) => {
|
|||||||
resolves = await dns.resolve4(event.url.hostname);
|
resolves = await dns.resolve4(event.url.hostname);
|
||||||
}
|
}
|
||||||
console.log({ resolves });
|
console.log({ resolves });
|
||||||
if (resolves.includes(ipDomain) || resolves.includes(ipDomainDualCert)) {
|
for (const ip of ipDomain) {
|
||||||
console.log('OK');
|
if (resolves.includes(ip)) {
|
||||||
} else {
|
return {
|
||||||
throw false;
|
status: 200
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
for (const ip of ipDomainDualCert) {
|
||||||
|
if (resolves.includes(ip)) {
|
||||||
|
return {
|
||||||
|
status: 200
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw false;
|
||||||
} else {
|
} else {
|
||||||
throw false;
|
throw false;
|
||||||
}
|
}
|
||||||
@ -70,11 +80,14 @@ export const post: RequestHandler = async (event) => {
|
|||||||
resolves = await dns.resolve4(event.url.hostname);
|
resolves = await dns.resolve4(event.url.hostname);
|
||||||
}
|
}
|
||||||
console.log({ resolves });
|
console.log({ resolves });
|
||||||
if (resolves.includes(ipDomain)) {
|
for (const ip of ipDomain) {
|
||||||
console.log('OK');
|
if (resolves.includes(ip)) {
|
||||||
} else {
|
return {
|
||||||
throw false;
|
status: 200
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
throw false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
throw {
|
throw {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user