Skip to content

Commit

Permalink
enable tls renegotiation in reverse proxy and have config option to d…
Browse files Browse the repository at this point in the history
…isable (#1912)
  • Loading branch information
joshblakeley authored and buger committed Sep 25, 2018
1 parent a0afb8b commit 5dafcff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ type Config struct {
ProxySSLMinVersion uint16 `json:"proxy_ssl_min_version"`
ProxySSLCipherSuites []string `json:"proxy_ssl_ciphers"`
ProxyDefaultTimeout int `json:"proxy_default_timeout"`
ProxySSLDisableRenegotiation bool `json:"proxy_ssl_disable_renegotiation"`
LogLevel string `json:"log_level"`
Security SecurityConfig `json:"security"`
EnableKeyLogging bool `json:"enable_key_logging"`
Expand Down
4 changes: 4 additions & 0 deletions reverse_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ func httpTransport(timeOut int, rw http.ResponseWriter, req *http.Request, p *Re
transport.TLSClientConfig.CipherSuites = getCipherAliases(p.TykAPISpec.Proxy.Transport.SSLCipherSuites)
}

if !config.Global().ProxySSLDisableRenegotiation {
transport.TLSClientConfig.Renegotiation = tls.RenegotiateFreelyAsClient
}

// Use the default unless we've modified the timout
if timeOut > 0 {
log.Debug("Setting timeout for outbound request to: ", timeOut)
Expand Down

0 comments on commit 5dafcff

Please sign in to comment.