Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
Forwarding Config check (#163)
Browse files Browse the repository at this point in the history
- ensuring the use does not specific the tls settings
  • Loading branch information
gambol99 authored Dec 19, 2016
1 parent b310e17 commit 2ee7ae9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ func (r *Config) isValid() error {
if r.ForwardingPassword == "" {
return errors.New("no forwarding password")
}
if r.TLSCertificate != "" {
return errors.New("you don't need to specify a tls-certificate, use tls-ca-certificate instead")
}
if r.TLSPrivateKey != "" {
return errors.New("you don't need to specify the tls-private-key, use tls-ca-key instead")
}
} else {
if r.Upstream == "" {
return errors.New("you have not specified an upstream endpoint to proxy to")
Expand Down

0 comments on commit 2ee7ae9

Please sign in to comment.