Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/validatorapi: add response headers #2419

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Conversation

dB2510
Copy link
Contributor

@dB2510 dB2510 commented Jul 11, 2023

Adds support to write response headers for API endpoints. This is added in order to support latest beacon APIs spec change to return response headers in some endpoints. Refer:

category: feature
ticket: none

Comment on lines +607 to +609
resHeaders := make(http.Header)
resHeaders.Add("Eth-Consensus-Version", block.Version.String())

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a test for this 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch coverage: 46.80% and project coverage change: +0.04 🎉

Comparison is base (4e903ca) 53.74% compared to head (a41f635) 53.79%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2419      +/-   ##
==========================================
+ Coverage   53.74%   53.79%   +0.04%     
==========================================
  Files         198      199       +1     
  Lines       26418    26465      +47     
==========================================
+ Hits        14198    14236      +38     
- Misses      10460    10462       +2     
- Partials     1760     1767       +7     
Impacted Files Coverage Δ
core/validatorapi/router.go 65.83% <46.80%> (+1.42%) ⬆️

... and 14 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dB2510 dB2510 added the merge when ready Indicates bulldozer bot may merge when all checks pass label Jul 12, 2023
@obol-bulldozer obol-bulldozer bot merged commit b43e768 into main Jul 12, 2023
11 checks passed
@obol-bulldozer obol-bulldozer bot deleted the dhruv/respheaders branch July 12, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants