proxy: Fix #1574; health check now respects hostname when upstream Host header is configured (#1577)

* Implement adding Host header to health check

* Fix type problems

* Fix duplicate function, Replace args

* Add debugging

* Add debugging

* Add debugging

* Add debugging

* Attempt to set req.Host instead of the header

* Clean up debugging

* Fix missing newline

* Fix spelling

* Add test, refactoring

* Fix with gofmt

* Add error check on NewRequest
This commit is contained in:
Francis Lavoie
2017-04-17 11:58:47 -04:00
committed by Matt Holt
parent 8d1da68b47
commit 33257de2e8
5 changed files with 85 additions and 20 deletions

View File

@@ -31,7 +31,7 @@ var paths = map[string]map[string]string{
func assertEqual(t *testing.T, expected, received string) {
if expected != received {
t.Errorf("\tExpected: %s\n\t\t\tRecieved: %s", expected, received)
t.Errorf("\tExpected: %s\n\t\t\tReceived: %s", expected, received)
}
}