connect tailscale node status through platform gateway
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -28,8 +28,17 @@ adminRoutes.get('/admin/tailscale/routes', async (c) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
adminRoutes.get('/admin/tailscale/acl', async (c) => {
|
adminRoutes.get('/admin/tailscale/acl', async (c) => {
|
||||||
|
const emptyPolicy = { groups: {}, tagOwners: {}, acls: [], raw: null }
|
||||||
|
try {
|
||||||
return c.json({
|
return c.json({
|
||||||
policy: await headscaleAdapter.getPolicyStatus(),
|
policy: await headscaleAdapter.getPolicyStatus(),
|
||||||
fetchedAt: new Date().toISOString(),
|
fetchedAt: new Date().toISOString(),
|
||||||
})
|
})
|
||||||
|
} catch (error) {
|
||||||
|
return c.json({
|
||||||
|
policy: emptyPolicy,
|
||||||
|
error: error instanceof Error ? error.message : String(error),
|
||||||
|
fetchedAt: new Date().toISOString(),
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user