Add Faraday middleware to append X-Forwarded-For header
Add config option to allow fetching of a forwarded for value, via a lambda
Add README instructions for setup in a Rails app
Alternatives
JsonApiClient provides the ability to add custom headers to an individual request, however this method would require a change everywhere we call the API.
MyApi::SomeResource.with_headers(x_forwarded_for: request.ip) do
MyApi::SomeResource.find(1)
end
Alternatives
JsonApiClient provides the ability to add custom headers to an individual request, however this method would require a change everywhere we call the API.
See: https://github.com/JsonApiClient/json_api_client#custom-headers