From e2bc287a0f3a255c309a7f6a58259e83f7488d36 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Fri, 5 Feb 2016 11:23:13 -0600 Subject: [PATCH] Change Hostsplitter-Secret to X-Hostsplitter-Secret. Thanks /u/nowprovision --- README.md | 2 +- hostsplitter.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b54542b..df8c620 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ A each site file should look like } ``` -The "secret" field is passed along with every request to that site in the ``Hostsplitter-Secret`` header. This is intended to be checked before trusting the passed along IP. +The "secret" field is passed along with every request to that site in the ``X-Hostsplitter-Secret`` header. This is intended to be checked before trusting the passed along IP. ## Real IP The original requester's IP is located in the ``X-Forwarded-For`` header. diff --git a/hostsplitter.go b/hostsplitter.go index 2582569..2a2fc0a 100644 --- a/hostsplitter.go +++ b/hostsplitter.go @@ -53,7 +53,7 @@ func main() { Director: func(r *http.Request) { HTTPLogger(r) if i, ok := routedHostnames[string(r.Host)]; ok { - r.Header.Set("Hostsplitter-Secret", Sites[i].Secret) + r.Header.Set("X-Hostsplitter-Secret", Sites[i].Secret) r.Header.Set("Host", r.Host) r.URL.Scheme = "http" r.URL.Host = Sites[i].GetBackend()