mirror of
https://github.com/Lissy93/web-check.git
synced 2025-08-09 21:07:33 +02:00
Return plain JSON, to be handled by middleware instead
This commit is contained in:
@ -10,7 +10,7 @@ const handler = async (url) => {
|
||||
{ auth: { username: process.env.TRANCO_USERNAME, password: process.env.TRANCO_API_KEY } }
|
||||
: {};
|
||||
const response = await axios.get(
|
||||
`https://tranco-list.eu/api/ranks/domain/${domain}`, { timeout: 2000 }, auth,
|
||||
`https://tranco-list.eu/api/ranks/domain/${domain}`, { timeout: 5000 }, auth,
|
||||
);
|
||||
if (!response.data || !response.data.ranks || response.data.ranks.length === 0) {
|
||||
return { skipped: `Skipping, as ${domain} isn't ranked in the top 100 million sites yet.`};
|
||||
|
Reference in New Issue
Block a user