Skip to content

Commit

Permalink
Add DNS Resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
jason5ng32 committed Apr 9, 2024
1 parent 229f4f9 commit a5c2e27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/dnsresolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ const dnsResolver = async (req, res) => {

const { hostname } = req.query;

if (typeof hostname !== 'string') {
return res.status(400).send({ error: 'Hostname parameter must be a string' });
}

if (!hostname) {
return res.status(400).send({ error: 'Missing hostname parameter' });
}
Expand Down

0 comments on commit a5c2e27

Please sign in to comment.