-
Notifications
You must be signed in to change notification settings - Fork 729
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
Added support for additionalHeaders in HTTPNetworkTransport #519
Conversation
@vandadnp: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
don't think this is proper solution. In case of OAuth this would not be enough... |
@RolandasRazma I agree it may not be the proper solution for OAuth, but do you think it is important for us to be able to change headers dynamically within the app. Right now (and for the past year +) me and my company have been using Apollo with a similar solution, see PR #257 . There have been several takes on a similar problem, and it would be nice to - at the least - have support for dynamic headers. I like solution #257 better than this, but would be okay with any solution that allows us to dynamically change headers. Please let me know your concerns, and if there are any other projects in the work that will solve this problem along with oauth. |
@rajkhatri I personally don't mind, just it would be nice to be able dynamically update request. That would cover OAuth and any "additional headers". "static" headers already (out of the box) can be added: var configuration = URLSessionConfiguration.default
configuration.httpAdditionalHeaders = [:] // <- add anything you want
let networkTransport = HTTPNetworkTransport(url: ..., configuration: configuration, sendOperationIdentifiers: ...)
let apolloClient = ApolloClient(networkTransport: networkTransport, store: ...) |
@rajkhatri You are adding state |
@RolandasRazma yep - we are able to add static headers, but we have our own in house version of OAuth/SAML and are changing the authorization header dynamically during the lifespan of the app in the fore/background. @michaelnisi we are just changing the headers. I understand that there might be exposure to other things. In terms of whose responsible for resetting |
@rajkhatri we also have "In house" OAuth support, but just adding extra headers is not enough to support it properly. |
No description provided.