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 header support when using custom request url #734

Merged
merged 7 commits into from
Aug 9, 2021

Conversation

ryanb-jobber
Copy link
Contributor

A more generalized version of #660 that allows arbitrary headers to be specified when using a custom requestUrl. It determines the headers at request time so that values can be specified dynamically.

Our use case is adding an Authorization header to proxied Google requests. The custom proxy allows us to append the Google API key server side so it is not exposed via app traffic (as we can not use a restricted key with this library). We also need to guard against unauthorized usage of the proxy.

Example usage:

requestUrl={{
  url: MY_PROXY,
  useOnPlatform: "all",
  headers: {
    Authorization: `Bearer ${accessToken}`,
   },

@mkilp
Copy link

mkilp commented Jul 11, 2021

This is desperately needed here too and should be merged soon.

@bell-steven bell-steven self-requested a review August 2, 2021 02:31
@bell-steven bell-steven self-assigned this Aug 2, 2021
@bell-steven
Copy link
Collaborator

bell-steven commented Aug 9, 2021

This is an excellent contribution. Thanks for the PR!

@bell-steven bell-steven merged commit 3988e45 into FaridSafi:master Aug 9, 2021
@bell-steven
Copy link
Collaborator

Released as v2.4.0

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.

3 participants