Fix log format after #4557

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-09-18 12:33:26 -03:00
parent c481296610
commit 4b4176c830
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
6 changed files with 3 additions and 70 deletions

View file

@ -17,7 +17,6 @@ limitations under the License.
package config
import (
"fmt"
"strconv"
"time"
@ -779,17 +778,6 @@ func NewDefault() Configuration {
return cfg
}
// BuildLogFormatUpstream format the log_format upstream using
// proxy_protocol_addr as remote client address if UseProxyProtocol
// is enabled.
func (cfg Configuration) BuildLogFormatUpstream() string {
if cfg.LogFormatUpstream == logFormatUpstream {
return fmt.Sprintf(cfg.LogFormatUpstream, "$remote_addr")
}
return cfg.LogFormatUpstream
}
// TemplateConfig contains the nginx configuration to render the file nginx.conf
type TemplateConfig struct {
ProxySetHeaders map[string]string