Change Hostsplitter-Secret to X-Hostsplitter-Secret. Thanks /u/nowprovision

This commit is contained in:
Ammar Bandukwala 2016-02-05 11:23:13 -06:00
parent aa3a6bf599
commit e2bc287a0f
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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()