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

Add possibility to add extra headers with JSON RPC URL #7898

Merged
merged 1 commit into from Jul 10, 2023

Conversation

sl1depengwyn
Copy link
Collaborator

@sl1depengwyn sl1depengwyn commented Jul 10, 2023

Close #7645

Changelog

Add ETHEREUM_JSONRPC_HTTP_HEADERS env variable that accepts json object with headers
Example:

{
  "x-api-key": "nbvkhadvnbkdfav",
  "x-id": "ndjkfvndfkjv"
}

will result as following headers in requests:

  Content-Type: application/json
  x-api-key: nbvkhadvnbkdfav
  x-id: ndjkfvndfkjv

Content-Type header is added automatically, however if it appears in env variable, its value will be taken from env variable

If ETHEREUM_JSONRPC_HTTP_HEADERS is not valid json app wouldn't start

Checklist for your Pull Request (PR)

@sl1depengwyn sl1depengwyn changed the title Add possibility to add extra headers with RPC URL Add possibility to add extra headers with JSON RPC URL Jul 10, 2023
@vbaranov vbaranov merged commit 24f4c88 into master Jul 10, 2023
15 checks passed
@vbaranov vbaranov deleted the mf-add-custom-headers branch July 10, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not add Extra headers with RPC URL
2 participants