Skip to content

Commit

Permalink
Disable experimental web interface for provider (#257)
Browse files Browse the repository at this point in the history
* Disable experimental web interface for provider

* More compact init

* Fixed typo

Co-authored-by: Sascha L. Teichmann <[email protected]>
  • Loading branch information
bernhardreiter and s-l-teichmann authored Jul 25, 2022
1 parent 4abddee commit dce0a9b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
11 changes: 8 additions & 3 deletions cmd/csaf_provider/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
)

Expand Down Expand Up @@ -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 {
Expand Down
11 changes: 9 additions & 2 deletions docs/csaf_provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ The following example file documents all available configuration options:
# against the JSON schema.
#no_validation = false

# Disable the web interface.
#no_web_ui = false
# Disable the experimental web interface.
#no_web_ui = true

# Make the provider take the publisher from the CSAF document.
#dynamic_provider_metadata = false
Expand Down Expand Up @@ -116,3 +116,10 @@ contact_details = "Example Company can be reached at [email protected], or
```
<!-- MARKDOWN-AUTO-DOCS:END -->


### Experimental web upload interface

There is an experimental upload interface which works with a web browser.
It is disabled by default, as there are known issues, notably:
* https://github.com/csaf-poc/csaf_distribution/issues/43
* https://github.com/csaf-poc/csaf_distribution/issues/256
4 changes: 2 additions & 2 deletions docs/examples/provider_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
# against the JSON schema.
#no_validation = false

# Disable the web interface.
#no_web_ui = false
# Disable the experimental web interface.
#no_web_ui = true

# Make the provider take the publisher from the CSAF document.
#dynamic_provider_metadata = false
Expand Down

0 comments on commit dce0a9b

Please sign in to comment.