Skip to content

Commit

Permalink
Log proxy settings from environment on startup (#7528)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Kalafut committed Sep 30, 2019
1 parent 53c3e53 commit 76cfbf7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
"sync"
"time"

"golang.org/x/net/http/httpproxy"

"github.com/hashicorp/vault/helper/metricsutil"

metrics "github.com/armon/go-metrics"
Expand Down Expand Up @@ -540,6 +542,11 @@ func (c *ServerCommand) Run(args []string) int {
vault.DefaultMaxRequestDuration = config.DefaultMaxRequestDuration
}

// log proxy settings
proxyCfg := httpproxy.FromEnvironment()
c.logger.Info("proxy environment", "http_proxy", proxyCfg.HTTPProxy,
"https_proxy", proxyCfg.HTTPSProxy, "no_proxy", proxyCfg.NoProxy)

// If mlockall(2) isn't supported, show a warning. We disable this in dev
// because it is quite scary to see when first using Vault. We also disable
// this if the user has explicitly disabled mlock in configuration.
Expand Down

0 comments on commit 76cfbf7

Please sign in to comment.