added check for TOS acceptance
This commit is contained in:
parent
9169a46ab1
commit
f9612042f3
|
|
@ -112,6 +112,7 @@ var (
|
||||||
UnixSocketPermission uint32
|
UnixSocketPermission uint32
|
||||||
EnablePprof bool
|
EnablePprof bool
|
||||||
EnableLetsEncrypt bool
|
EnableLetsEncrypt bool
|
||||||
|
LetsEncryptTOS bool
|
||||||
LetsEncryptDirectory string
|
LetsEncryptDirectory string
|
||||||
LetsEncryptEmail string
|
LetsEncryptEmail string
|
||||||
|
|
||||||
|
|
@ -724,10 +725,12 @@ func NewContext() {
|
||||||
UnixSocketPermission = uint32(UnixSocketPermissionParsed)
|
UnixSocketPermission = uint32(UnixSocketPermissionParsed)
|
||||||
}
|
}
|
||||||
EnableLetsEncrypt := sec.Key("ENABLE_LETSENCRYPT").MustBool(false)
|
EnableLetsEncrypt := sec.Key("ENABLE_LETSENCRYPT").MustBool(false)
|
||||||
if EnableLetsEncrypt {
|
LetsEncryptTOS := sec.Key("LETSENCRYPT_ACCEPTTOS").MustBool(false)
|
||||||
|
if !LetsEncryptTOS {
|
||||||
|
EnableLetsEncrypt = false
|
||||||
|
}
|
||||||
LetsEncryptDirectory = sec.Key("LETSENCRYPT_DIRECTORY").MustString("https")
|
LetsEncryptDirectory = sec.Key("LETSENCRYPT_DIRECTORY").MustString("https")
|
||||||
LetsEncryptEmail = sec.Key("LETSENCRYPT_EMAIL").MustString("")
|
LetsEncryptEmail = sec.Key("LETSENCRYPT_EMAIL").MustString("")
|
||||||
}
|
|
||||||
Domain = sec.Key("DOMAIN").MustString("localhost")
|
Domain = sec.Key("DOMAIN").MustString("localhost")
|
||||||
HTTPAddr = sec.Key("HTTP_ADDR").MustString("0.0.0.0")
|
HTTPAddr = sec.Key("HTTP_ADDR").MustString("0.0.0.0")
|
||||||
HTTPPort = sec.Key("HTTP_PORT").MustString("3000")
|
HTTPPort = sec.Key("HTTP_PORT").MustString("3000")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user