mirror of
https://github.com/Lissy93/web-check.git
synced 2025-08-09 05:04:31 +02:00
Return plain JSON, to be handled by middleware instead
This commit is contained in:
@ -97,10 +97,7 @@ const checkDomainAgainstDnsServers = async (domain) => {
|
||||
const handler = middleware(async (url) => {
|
||||
const domain = new URL(url).hostname;
|
||||
const results = await checkDomainAgainstDnsServers(domain);
|
||||
return {
|
||||
statusCode: 200,
|
||||
body: JSON.stringify({ blocklists: results })
|
||||
};
|
||||
return { blocklists: results };
|
||||
});
|
||||
|
||||
module.exports = middleware(handler);
|
||||
|
Reference in New Issue
Block a user