mirror of
https://github.com/Lissy93/web-check.git
synced 2025-08-14 23:02:35 +02:00
Updates all API functions, to work on both Vercel & Netlify
This commit is contained in:
@ -83,7 +83,7 @@ const fetchFromMyAPI = async (hostname) => {
|
||||
}
|
||||
};
|
||||
|
||||
const fetchWhoisData = async (url) => {
|
||||
const handler = async (url) => {
|
||||
if (!url.startsWith('http://') && !url.startsWith('https://')) {
|
||||
url = 'http://' + url;
|
||||
}
|
||||
@ -106,4 +106,6 @@ const fetchWhoisData = async (url) => {
|
||||
};
|
||||
};
|
||||
|
||||
exports.handler = middleware(fetchWhoisData);
|
||||
module.exports = middleware(handler);
|
||||
module.exports.handler = middleware(handler);
|
||||
|
||||
|
Reference in New Issue
Block a user