From d6175da2fa471972a469d054800d1fcf899025ee Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Tue, 16 Jul 2024 00:16:27 +0100 Subject: [PATCH] fix: update user-agent check for go-eth2-client (#6958) * fix: update user-agent check for go-eth2-client * Remove confusing comment --- packages/beacon-node/src/api/rest/base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/beacon-node/src/api/rest/base.ts b/packages/beacon-node/src/api/rest/base.ts index 4f5d9284f91b..5f191bf76beb 100644 --- a/packages/beacon-node/src/api/rest/base.ts +++ b/packages/beacon-node/src/api/rest/base.ts @@ -101,7 +101,7 @@ export class RestApiServer { // go-eth2-client supports handling SSZ data in response for these endpoints !["produceBlindedBlock", "produceBlockV3", "getBlockV2", "getStateV2"].includes(operationId) && // Only Vouch seems to override default header - ["Go-http-client", "Vouch"].includes(req.headers["user-agent"]?.split("/")[0] ?? "") + ["go-eth2-client", "Go-http-client", "Vouch"].includes(req.headers["user-agent"]?.split("/")[0] ?? "") ) { // Override Accept header to force server to return JSON req.headers.accept = "application/json";