Skip to content

Conversation

@efritz
Copy link
Contributor

@efritz efritz commented Jul 1, 2020

Closes #238.

This threads header values into the HTTP calls to the Sourcegraph instance via envvars such as SRC_HEADER_FOO=BAR (where Foo: bar would be the additional header value - note that header names are case insensitive).

This is applied to:

  • GraphQL requests
  • LSIF uploads
  • get-curl commands
  • version command
  • campagins actions

This is notably to fix a particular customer's issue, which has their instance behind an authenticating proxy that accepts special bearer tokens.

@efritz efritz requested review from emidoots, garobrik, mrnugget and sqs July 1, 2020 20:04
@efritz
Copy link
Contributor Author

efritz commented Jul 1, 2020

cc @ryanslade as a sanity check to ensure that this isn't undoing any work in deprecating non-envvar settings.

Copy link
Contributor

@garobrik garobrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: Stephen Gutekanst <stephen.gutekanst@gmail.com>
Copy link
Member

@emidoots emidoots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

Copy link
Contributor

@mrnugget mrnugget left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Left some comments regarding documentation of this feature.

Copy link
Contributor

@mrnugget mrnugget left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@efritz efritz merged commit a7aec11 into master Jul 8, 2020
@efritz efritz deleted the additional-headers branch July 8, 2020 00:25
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.

Allow user to supply http headers for requests src-cli sends

6 participants