1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-23 00:40:46 +02:00

Ensure exclude-logging-paths is consistent with other options

This commit is contained in:
Joel Speed
2020-05-24 21:59:18 +01:00
parent f7c88f53d1
commit 94e31f8b65
2 changed files with 4 additions and 6 deletions

View File

@ -2,7 +2,6 @@ package validation
import (
"os"
"strings"
"github.com/oauth2-proxy/oauth2-proxy/pkg/apis/options"
"github.com/oauth2-proxy/oauth2-proxy/pkg/logger"
@ -49,12 +48,10 @@ func configureLogger(o options.Logging, pingPath string, msgs []string) []string
logger.SetAuthTemplate(o.AuthFormat)
logger.SetReqTemplate(o.RequestFormat)
excludePaths := make([]string, 0)
excludePaths = append(excludePaths, strings.Split(o.ExcludePaths, ",")...)
excludePaths := o.ExcludePaths
if o.SilencePing {
excludePaths = append(excludePaths, pingPath)
}
logger.SetExcludePaths(excludePaths)
if !o.LocalTime {