Skip to content

Commit

Permalink
fix: update user-agent check for go-eth2-client (#6958)
Browse files Browse the repository at this point in the history
* fix: update user-agent check for go-eth2-client

* Remove confusing comment
  • Loading branch information
nflaig authored Jul 15, 2024
1 parent f66aae4 commit d6175da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/api/rest/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit d6175da

Please sign in to comment.