mirror of
https://codeberg.org/alicia/web-check.git
synced 2026-03-14 22:55:47 +01:00
Update API endpoints to read URL params from either option
This commit is contained in:
parent
e2e16c9439
commit
d03acb8a3c
22 changed files with 33 additions and 23 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue