From 06f3445261b030898473e013cdb323b51e52aaf0 Mon Sep 17 00:00:00 2001 From: Yuan Si Date: Tue, 2 May 2023 05:44:14 +0800 Subject: [PATCH] Unify device id Signed-off-by: Yuan Si --- handler/private.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/handler/private.go b/handler/private.go index c6fa831..73c23cb 100644 --- a/handler/private.go +++ b/handler/private.go @@ -125,10 +125,7 @@ func Handshake(ctx *gin.Context) { params, err := url.ParseQuery(string(decryptedBody)) CheckErr(err) randKey := params.Get("randkey") - deviceId := params.Get("deviceid") - if deviceId == "" { - deviceId = ctx.Request.Header.Get("X-DEVICEID") - } + deviceId := ctx.Request.Header.Get("X-DEVICEID") // fmt.Println(randKey) // fmt.Println(deviceId)