From c74bbe4d46d6d61148d4a2212d6b0a2a2c3bbd7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20K=C3=B6nig?= Date: Tue, 7 Jan 2025 20:02:08 +0100 Subject: [PATCH] Use correct mime type on fetch of execution config When vouch was configured to fetch the blockrelay/executionconfig from an http endpoint, the respective majordomo call did not properly set the `Content-Type` and `Accept` headers. Instead, `Content-Type: text/plain` was sent. This commit adds the respective `MIMEType` value to the majordomo context so that these requests are now sent with the `Content-Type` and `Accept` headers set to `application/json`. --- services/blockrelay/standard/executionconfig.go | 1 + 1 file changed, 1 insertion(+) diff --git a/services/blockrelay/standard/executionconfig.go b/services/blockrelay/standard/executionconfig.go index caefbf4b..b31c19fa 100644 --- a/services/blockrelay/standard/executionconfig.go +++ b/services/blockrelay/standard/executionconfig.go @@ -146,6 +146,7 @@ func (s *Service) obtainExecutionConfig(ctx context.Context, } ctx = context.WithValue(ctx, &httpconfidant.HTTPMethod{}, http.MethodPost) + ctx = context.WithValue(ctx, &httpconfidant.MIMEType{}, "application/json") pubkeyStrs := make([]string, 0, len(pubkeys)) for _, pubkey := range pubkeys { pubkeyStrs = append(pubkeyStrs, pubkey.String())