Update API endpoints to read URL params from either option
This commit is contained in:
@@ -2,7 +2,7 @@ const dns = require('dns');
|
||||
|
||||
/* Lambda function to fetch the IP address of a given URL */
|
||||
exports.handler = function (event, context, callback) {
|
||||
const addressParam = event.queryStringParameters.url;
|
||||
const addressParam = (event.queryStringParameters || event.query).url;
|
||||
|
||||
if (!addressParam) {
|
||||
callback(null, errorResponse('Address parameter is missing.'));
|
||||
|
||||
Reference in New Issue
Block a user