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

Disable experimental web interface for provider (#257)

* Disable experimental web interface for provider

* More compact init

* Fixed typo

Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
This commit is contained in:
Bernhard E. Reiter 2022-07-25 16:28:54 +02:00 committed by GitHub
parent 4abddee3bb
commit dce0a9b51f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 7 deletions

View file

@ -27,8 +27,9 @@ const (
defaultConfigPath = configPrefix + "/config.toml" // Default path to the config file.
defaultOpenPGPPrivateKey = configPrefix + "/openpgp_private.asc"
defaultOpenPGPPublicKey = configPrefix + "/openpgp_public.asc"
defaultFolder = "/var/www/" // Default folder path.
defaultWeb = "/var/www/html" // Default web path.
defaultFolder = "/var/www/" // Default folder path.
defaultWeb = "/var/www/html" // Default web path.
defaultNoWebUI = true
defaultUploadLimit = 50 * 1024 * 1024 // Default limit size of the uploaded file.
)
@ -222,7 +223,11 @@ func loadConfig() (*config, error) {
if path == "" {
path = defaultConfigPath
}
var cfg config
// Preset defaults
cfg := config{
NoWebUI: defaultNoWebUI,
}
md, err := toml.DecodeFile(path, &cfg)
if err != nil {