From 5c4dc3ab39c441fdc1ff7859d604b7910a45bc69 Mon Sep 17 00:00:00 2001 From: Yuan Si Date: Sat, 22 Apr 2023 15:30:50 +0800 Subject: [PATCH] Fix device id check for iOS Signed-off-by: Yuan Si --- handler/private.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handler/private.go b/handler/private.go index c550b47..d1aa93c 100644 --- a/handler/private.go +++ b/handler/private.go @@ -126,6 +126,9 @@ func HandshakeHandler(ctx *gin.Context) { CheckErr(err) randKey := params.Get("randkey") deviceId := params.Get("deviceid") + if deviceId == "" { + deviceId = ctx.Request.Header.Get("X-DEVICEID") + } // fmt.Println(randKey) // fmt.Println(deviceId)