Proxy: return 200 on / regardless of prefix (#572)

This commit is contained in:
Marwan Sulaiman
2018-08-26 22:11:04 -04:00
committed by GitHub
parent 53f457e0b8
commit 9860bd51e7
+5
View File
@@ -99,6 +99,11 @@ func App() (*buffalo.App, error) {
Logger: blggr,
})
if prefix := env.AthensPathPrefix(); prefix != "" {
// certain Ingress Controllers (such as GCP Load Balancer)
// can not send custom headers and therefore if the proxy
// is running behind a prefix as well as some authentication
// mechanism, we should allow the plain / to return 200.
app.GET("/", healthHandler)
app = app.Group(prefix)
}