pengwynn/octokit — pull request #133 by bjeanes (2012-09-12 00:00:09+00:00)
Title: Allow overriding Host header

This supports scenarios where the GHE instance is behind a proxy that
interferes with normal API functionality (e.g. authenticates with
OAuth).

In order to use the API when GHE is behind a proxy like that, you need
to hit it using a different (internal) hostname. However, as of version
11.10.280, GHE redirects all non-canonical hostname requests to the
canonical version. This breaks using a different hostname for API
requests.

This commit enables access using a different hostname by overriding the
Host header so that GHE does not perform the redirect.