mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 11:52:12 +03:00
Add ssl cert/key options
This commit is contained in:
parent
9c7f566d4d
commit
ce4aea8da1
@ -18,8 +18,10 @@ type Options struct {
|
||||
User string `long:"user" description:"Database user"`
|
||||
Pass string `long:"pass" description:"Password for user"`
|
||||
DbName string `long:"db" description:"Database name"`
|
||||
Ssl string `long:"ssl" description:"SSL option"`
|
||||
SslRootCert string `long:"ssl-root-cert" description:"SSL Root Cert"`
|
||||
Ssl string `long:"ssl" description:"SSL mode"`
|
||||
SslRootCert string `long:"ssl-rootcert" description:"SSL certificate authority file"`
|
||||
SslCert string `long:"ssl-cert" description:"SSL client certificate file"`
|
||||
SslKey string `long:"ssl-key" description:"SSL client certificate key file"`
|
||||
HTTPHost string `long:"bind" description:"HTTP server host" default:"localhost"`
|
||||
HTTPPort uint `long:"listen" description:"HTTP server listen port" default:"8081"`
|
||||
AuthUser string `long:"auth-user" description:"HTTP basic auth user"`
|
||||
|
@ -115,6 +115,12 @@ func BuildStringFromOptions(opts command.Options) (string, error) {
|
||||
query.Add("sslmode", "disable")
|
||||
}
|
||||
}
|
||||
if opts.SslCert != "" {
|
||||
query.Add("sslcert", opts.SslCert)
|
||||
}
|
||||
if opts.SslKey != "" {
|
||||
query.Add("sslkey", opts.SslKey)
|
||||
}
|
||||
if opts.SslRootCert != "" {
|
||||
query.Add("sslrootcert", opts.SslRootCert)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user