Add options to manage snapshot publishing

This commit is contained in:
shoonoise
2015-10-29 16:40:03 +03:00
parent 3b4c095b49
commit b4a2b96e32
7 changed files with 43 additions and 5 deletions
+11
View File
@@ -76,6 +76,11 @@ var (
EmailCodeValidMinutes int
DataProxyWhiteList map[string]bool
// Snapshots
ExternalSnapshotUrl string
ExternalSnapshotName string
ExternalEnabled bool
// User settings
AllowUserSignUp bool
AllowUserOrgCreate bool
@@ -414,6 +419,12 @@ func NewConfigContext(args *CommandLineArgs) error {
CookieRememberName = security.Key("cookie_remember_name").String()
DisableGravatar = security.Key("disable_gravatar").MustBool(true)
// read snapshots settings
snapshots := Cfg.Section("snapshots")
ExternalSnapshotUrl = snapshots.Key("external_snapshot_url").String()
ExternalSnapshotName = snapshots.Key("external_snapshot_name").String()
ExternalEnabled = snapshots.Key("external_enabled").MustBool(true)
// read data source proxy white list
DataProxyWhiteList = make(map[string]bool)
for _, hostAndIp := range security.Key("data_source_proxy_whitelist").Strings(" ") {