1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Merge branch 'main' into client-certificate

This commit is contained in:
Bernhard E. Reiter 2022-03-23 20:19:51 +01:00 committed by GitHub
commit 1d7e7a3124
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 14 deletions

View file

@ -39,7 +39,7 @@ type config struct {
TLPs []tlp `toml:"tlps"`
UploadSignature bool `toml:"upload_signature"`
OpenPGPURL string `toml:"openpgp_url"`
Domain string `toml:"domain"`
CanonicalURLPrefix string `toml:"canonical_url_prefix"`
NoPassphrase bool `toml:"no_passphrase"`
NoValidation bool `toml:"no_validation"`
NoWebUI bool `toml:"no_web_ui"`
@ -149,8 +149,8 @@ func loadConfig() (*config, error) {
cfg.Web = defaultWeb
}
if cfg.Domain == "" {
cfg.Domain = "http://" + os.Getenv("SERVER_NAME")
if cfg.CanonicalURLPrefix == "" {
cfg.CanonicalURLPrefix = "https://" + os.Getenv("SERVER_NAME")
}
if cfg.TLPs == nil {