2021-02-14 18:47:15 +00:00
|
|
|
package options
|
|
|
|
|
|
|
|
// Server represents the configuration for an HTTP(S) server
|
|
|
|
type Server struct {
|
2021-06-02 20:41:30 +02:00
|
|
|
// BindAddress is the address on which to serve traffic.
|
2021-02-14 18:47:15 +00:00
|
|
|
// Leave blank or set to "-" to disable.
|
|
|
|
BindAddress string
|
|
|
|
|
2021-06-02 20:41:30 +02:00
|
|
|
// SecureBindAddress is the address on which to serve secure traffic.
|
2021-02-14 18:47:15 +00:00
|
|
|
// Leave blank or set to "-" to disable.
|
|
|
|
SecureBindAddress string
|
|
|
|
|
|
|
|
// TLS contains the information for loading the certificate and key for the
|
2021-12-17 00:01:32 +01:00
|
|
|
// secure traffic and further configuration for the TLS server.
|
2021-02-14 18:47:15 +00:00
|
|
|
TLS *TLS
|
|
|
|
}
|
|
|
|
|
2021-12-17 00:01:32 +01:00
|
|
|
// TLS contains the information for loading a TLS certificate and key
|
|
|
|
// as well as an optional minimal TLS version that is acceptable.
|
2021-02-14 18:47:15 +00:00
|
|
|
type TLS struct {
|
2021-06-02 20:41:30 +02:00
|
|
|
// Key is the TLS key data to use.
|
2021-02-14 18:47:15 +00:00
|
|
|
// Typically this will come from a file.
|
|
|
|
Key *SecretSource
|
|
|
|
|
|
|
|
// Cert is the TLS certificate data to use.
|
|
|
|
// Typically this will come from a file.
|
|
|
|
Cert *SecretSource
|
2021-12-17 00:01:32 +01:00
|
|
|
|
|
|
|
// MinVersion is the minimal TLS version that is acceptable.
|
|
|
|
// E.g. Set to "TLS1.3" to select TLS version 1.3
|
|
|
|
MinVersion string
|
2021-02-14 18:47:15 +00:00
|
|
|
}
|