mirror of
https://github.com/Lissy93/web-check.git
synced 2025-08-09 05:04:31 +02:00
Update API endpoints to read URL params from either option
This commit is contained in:
@ -34,7 +34,7 @@ exports.handler = async (event, context, callback) => {
|
||||
}
|
||||
|
||||
// Get URL from param
|
||||
let url = event.queryStringParameters.url;
|
||||
let url = (event.queryStringParameters || event.query).url;
|
||||
if (!/^https?:\/\//i.test(url)) {
|
||||
url = 'http://' + url;
|
||||
}
|
||||
|
Reference in New Issue
Block a user