mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
✨Add service ping
This commit is contained in:
@@ -10,6 +10,9 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
const response = await ping.promise.probe(parsedUrl.hostname, {
|
||||
timeout: 1,
|
||||
});
|
||||
|
||||
console.log(response);
|
||||
|
||||
// Return 200 if the alive property is true
|
||||
if (response.alive) {
|
||||
return res.status(200).end();
|
||||
|
||||
Reference in New Issue
Block a user