proxy: implement simple healthcheck
This commit is contained in:
@ -47,7 +47,6 @@ func getCommonOptions() *options.Options {
|
||||
commonOpts.EmailDomains = []string{"*"}
|
||||
commonOpts.ProviderType = "oidc"
|
||||
commonOpts.ProxyPrefix = "/pbprox"
|
||||
commonOpts.PingPath = "/pbprox/ping"
|
||||
commonOpts.SkipProviderButton = true
|
||||
commonOpts.Logging.SilencePing = true
|
||||
commonOpts.SetXAuthRequest = true
|
||||
|
@ -82,6 +82,10 @@ func (s *Server) ServeHTTPS() {
|
||||
}
|
||||
|
||||
func (s *Server) handler(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path == "/pbprox/ping" {
|
||||
w.WriteHeader(204)
|
||||
return
|
||||
}
|
||||
handler, ok := s.Handlers[r.Host]
|
||||
if !ok {
|
||||
// If we only have one handler, host name switching doesn't matter
|
||||
|
Reference in New Issue
Block a user