mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-03 05:01:22 +02:00
Integrate HealthCheck middleware
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
// configureLogger is responsible for configuring the logger based on the options given
|
||||
func configureLogger(o options.Logging, pingPath string, msgs []string) []string {
|
||||
func configureLogger(o options.Logging, msgs []string) []string {
|
||||
// Setup the log file
|
||||
if len(o.File.Filename) > 0 {
|
||||
// Validate that the file/dir can be written
|
||||
@@ -48,11 +48,7 @@ func configureLogger(o options.Logging, pingPath string, msgs []string) []string
|
||||
logger.SetAuthTemplate(o.AuthFormat)
|
||||
logger.SetReqTemplate(o.RequestFormat)
|
||||
|
||||
excludePaths := o.ExcludePaths
|
||||
if o.SilencePing {
|
||||
excludePaths = append(excludePaths, pingPath)
|
||||
}
|
||||
logger.SetExcludePaths(excludePaths)
|
||||
logger.SetExcludePaths(o.ExcludePaths)
|
||||
|
||||
if !o.LocalTime {
|
||||
logger.SetFlags(logger.Flags() | logger.LUTC)
|
||||
|
||||
@@ -264,7 +264,7 @@ func Validate(o *options.Options) error {
|
||||
|
||||
msgs = parseSignatureKey(o, msgs)
|
||||
msgs = validateCookieName(o, msgs)
|
||||
msgs = configureLogger(o.Logging, o.PingPath, msgs)
|
||||
msgs = configureLogger(o.Logging, msgs)
|
||||
|
||||
if o.ReverseProxy {
|
||||
parser, err := ip.GetRealClientIPParser(o.RealClientIPHeader)
|
||||
|
||||
Reference in New Issue
Block a user