Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Fix detecting GitHub Enterprise Server behind a HAProxy #2562

Merged
merged 9 commits into from
Mar 18, 2021

Conversation

jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented Oct 26, 2020

The X-GitHub-Request-Id header is used to check whether an error is returned from a GitHub or GitHub Enterprise server instance. If the server is behind a HAProxy, the header will be converted to lower case. We were only checking for a case sensitive X-GitHub-Request-Id header and not detecting GHES instances behind a HAProxy proxy.

What this PR does

  • Check any casing of the X-GitHub-Request-Id header

Credits

This bug was discovered and documented by @osmanager in #2560. Thankyou!

Related

Fixes #2560

@jcansdale jcansdale changed the title Fix detecting GitHub API Exception Fix detecting GitHub Enterprise Server behind a HAProxy Oct 26, 2020
@jcansdale jcansdale merged commit bccca13 into master Mar 18, 2021
@jcansdale jcansdale deleted the fixes/2560-IsGitHubApiException branch March 18, 2021 14:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Report Solution for GHE Connecting Bug
1 participant