Skip to content

Commit 9b011b4

Browse files
committed
instanceid auth
1 parent e48c773 commit 9b011b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/v1/device/device.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,11 @@ func statusDevice(c *gin.Context) {
406406
authorized = true
407407
}
408408

409+
// Allow a serviceHost to regain its configuration
410+
if !authorized && (deviceId == "device-id-"+device.InstanceID) {
411+
authorized = true
412+
}
413+
409414
if !authorized {
410415
c.AbortWithStatus(http.StatusUnauthorized)
411416
return

0 commit comments

Comments
 (0)