mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-08 05:19:53 +00:00
feat: provide HYSTERIA_ACME_DIR to control acme data directory
This commit is contained in:
parent
1abddbff19
commit
1f1b071ca8
@ -24,6 +24,7 @@ const (
|
||||
appLogLevelEnv = "HYSTERIA_LOG_LEVEL"
|
||||
appLogFormatEnv = "HYSTERIA_LOG_FORMAT"
|
||||
appDisableUpdateCheckEnv = "HYSTERIA_DISABLE_UPDATE_CHECK"
|
||||
appACMEDirEnv = "HYSTERIA_ACME_DIR"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -232,7 +232,11 @@ func (c *serverConfig) fillTLSConfig(hyConfig *server.Config) error {
|
||||
// ACME
|
||||
dataDir := c.ACME.Dir
|
||||
if dataDir == "" {
|
||||
dataDir = "acme"
|
||||
// If not specified in the config, check the environment variable
|
||||
// before resorting to the default "acme" value. The main reason
|
||||
// we have this is so that our setup script can set it to the
|
||||
// user's home directory.
|
||||
dataDir = envOrDefaultString(appACMEDirEnv, "acme")
|
||||
}
|
||||
cmCfg := &certmagic.Config{
|
||||
RenewalWindowRatio: certmagic.DefaultRenewalWindowRatio,
|
||||
|
Loading…
x
Reference in New Issue
Block a user