mirror of
https://github.com/stashapp/stash.git
synced 2026-05-08 20:58:48 +02:00
Allow SSL cert paths to be specified in config (#4910)
This commit is contained in:
parent
62bdff351d
commit
dcb86d9186
1 changed files with 14 additions and 2 deletions
|
|
@ -232,6 +232,9 @@ const (
|
||||||
SecurityTripwireAccessedFromPublicInternet = "security_tripwire_accessed_from_public_internet"
|
SecurityTripwireAccessedFromPublicInternet = "security_tripwire_accessed_from_public_internet"
|
||||||
securityTripwireAccessedFromPublicInternetDefault = ""
|
securityTripwireAccessedFromPublicInternetDefault = ""
|
||||||
|
|
||||||
|
sslCertPath = "ssl_cert_path"
|
||||||
|
sslKeyPath = "ssl_key_path"
|
||||||
|
|
||||||
// DLNA options
|
// DLNA options
|
||||||
DLNAServerName = "dlna.server_name"
|
DLNAServerName = "dlna.server_name"
|
||||||
DLNADefaultEnabled = "dlna.default_enabled"
|
DLNADefaultEnabled = "dlna.default_enabled"
|
||||||
|
|
@ -356,8 +359,17 @@ func (i *Config) InitTLS() {
|
||||||
paths.GetStashHomeDirectory(),
|
paths.GetStashHomeDirectory(),
|
||||||
}
|
}
|
||||||
|
|
||||||
i.certFile = fsutil.FindInPaths(tlsPaths, "stash.crt")
|
i.certFile = i.getString(sslCertPath)
|
||||||
i.keyFile = fsutil.FindInPaths(tlsPaths, "stash.key")
|
if i.certFile == "" {
|
||||||
|
// Look for default file
|
||||||
|
i.certFile = fsutil.FindInPaths(tlsPaths, "stash.crt")
|
||||||
|
}
|
||||||
|
|
||||||
|
i.keyFile = i.getString(sslKeyPath)
|
||||||
|
if i.keyFile == "" {
|
||||||
|
// Look for default file
|
||||||
|
i.keyFile = fsutil.FindInPaths(tlsPaths, "stash.key")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *Config) GetTLSFiles() (certFile, keyFile string) {
|
func (i *Config) GetTLSFiles() (certFile, keyFile string) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue