- Uses certificate and key files provided by admin in config - Let's Encrypt integration planned, but not even close to working - Initial HTTP3 Support added
This commit is contained in:
parent
68d7a5e8c3
commit
9151bfb3be
6 changed files with 250 additions and 42 deletions
|
@ -14,8 +14,10 @@ type ConfigSSL struct {
|
|||
HandleSSL bool `toml:"handle_ssl"` // Whether Linstrom should handle SSL encryption itself in case of http1/2
|
||||
// If Linstrom is to handle SSL, whether it should use LetsEncrypt for certificates
|
||||
UseLetsEncrypt *bool `toml:"use_lets_encrypt"`
|
||||
// Path to the certificate if Linstrom is to handle SSL while not using LetsEncrypt
|
||||
// Path to the certificate file (.crt) if Linstrom is to handle SSL while not using LetsEncrypt
|
||||
CertificateFile *string `toml:"certificate_file"`
|
||||
// Path to the certificate key file (.key) to handle SSL while not using LetsEncrypt
|
||||
CertKeyFile *string `toml:"cert_key_file"`
|
||||
// Mail adress to use in case of using LetsEncrypt
|
||||
AdminMail *string `toml:"admin_mail"`
|
||||
}
|
||||
|
@ -251,6 +253,14 @@ func (gc *ConfigGeneral) GetFullPublicUrl() string {
|
|||
return str
|
||||
}
|
||||
|
||||
func (gc *ConfigGeneral) GetFinalPublicPort() int {
|
||||
if gc.PublicPort != nil {
|
||||
return *gc.PublicPort
|
||||
} else {
|
||||
return gc.PrivatePort
|
||||
}
|
||||
}
|
||||
|
||||
func (sc *ConfigStorage) BuildPostgresDSN() string {
|
||||
dsn := fmt.Sprintf(
|
||||
"host=%s user=%s password=%s dbname=%s port=%d",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue