Closed tsvecak closed 4 years ago
This is super interesting and I can see why you'd need that. Does your client only need these headers set on the graphql
endpoint? I just wonder if that sort of thing is better off being set in the theme than here?
Fair point Drew... Tbh in the case I have we will only ever use it for graphql so in our case it makes no sense to apply this to REST endpoints.
I can see why you'd want to control this here, makes sense.
This will allow a user to add it's own custom fields into headers and that way prevent any cors issues with custom fields being sent along the request
EDIT: Reason behind this PR was that we have an apollo client that sends a custom parameter in headers when it reaches out to multiple services. In order to reduce amount of complexity on the client side we've thought it might benefit others to be able to add custom fields to headers within their projects.
Please do point out if any of the updates don't make sense or require some more info etc.