MSP-4211 Add remote setting for client request id forwarding

This commit is contained in:
Синельник Тимур Романович committed 2024-10-11 14:32:17 +03:00
1 parent f9b2632335
commit 875d3985bd
6 files changed
+39 -28

No files matched your search

+2 -2
View File
@@ -102,9 +102,9 @@ func setHttpHeaders(ctx *request.Context, header http.Header, skipAuth bool) err
header.Set(grpc.ServiceIdHeader, strconv.Itoa(authData.ServiceId))
header.Set(grpc.ApplicationIdHeader, strconv.Itoa(authData.ApplicationId))
if ctx.IsAdminAuthenticated() {
header.Set(xAdminIdHeader, strconv.Itoa(ctx.AdminId()))
header.Set(xAdminIdHeader, strconv.Itoa(ctx.AdminId())) //nolint:canonicalheader
} else {
header.Del(xAdminIdHeader)
header.Del(xAdminIdHeader) //nolint:canonicalheader
}
}
return nil