mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +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:
parent
4abddee3bb
commit
dce0a9b51f
3 changed files with 19 additions and 7 deletions
|
|
@ -27,8 +27,9 @@ const (
|
||||||
defaultConfigPath = configPrefix + "/config.toml" // Default path to the config file.
|
defaultConfigPath = configPrefix + "/config.toml" // Default path to the config file.
|
||||||
defaultOpenPGPPrivateKey = configPrefix + "/openpgp_private.asc"
|
defaultOpenPGPPrivateKey = configPrefix + "/openpgp_private.asc"
|
||||||
defaultOpenPGPPublicKey = configPrefix + "/openpgp_public.asc"
|
defaultOpenPGPPublicKey = configPrefix + "/openpgp_public.asc"
|
||||||
defaultFolder = "/var/www/" // Default folder path.
|
defaultFolder = "/var/www/" // Default folder path.
|
||||||
defaultWeb = "/var/www/html" // Default web path.
|
defaultWeb = "/var/www/html" // Default web path.
|
||||||
|
defaultNoWebUI = true
|
||||||
defaultUploadLimit = 50 * 1024 * 1024 // Default limit size of the uploaded file.
|
defaultUploadLimit = 50 * 1024 * 1024 // Default limit size of the uploaded file.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -222,7 +223,11 @@ func loadConfig() (*config, error) {
|
||||||
if path == "" {
|
if path == "" {
|
||||||
path = defaultConfigPath
|
path = defaultConfigPath
|
||||||
}
|
}
|
||||||
var cfg config
|
|
||||||
|
// Preset defaults
|
||||||
|
cfg := config{
|
||||||
|
NoWebUI: defaultNoWebUI,
|
||||||
|
}
|
||||||
|
|
||||||
md, err := toml.DecodeFile(path, &cfg)
|
md, err := toml.DecodeFile(path, &cfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,8 @@ The following example file documents all available configuration options:
|
||||||
# against the JSON schema.
|
# against the JSON schema.
|
||||||
#no_validation = false
|
#no_validation = false
|
||||||
|
|
||||||
# Disable the web interface.
|
# Disable the experimental web interface.
|
||||||
#no_web_ui = false
|
#no_web_ui = true
|
||||||
|
|
||||||
# Make the provider take the publisher from the CSAF document.
|
# Make the provider take the publisher from the CSAF document.
|
||||||
#dynamic_provider_metadata = false
|
#dynamic_provider_metadata = false
|
||||||
|
|
@ -116,3 +116,10 @@ contact_details = "Example Company can be reached at contact_us@example.com, or
|
||||||
```
|
```
|
||||||
<!-- MARKDOWN-AUTO-DOCS:END -->
|
<!-- 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
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@
|
||||||
# against the JSON schema.
|
# against the JSON schema.
|
||||||
#no_validation = false
|
#no_validation = false
|
||||||
|
|
||||||
# Disable the web interface.
|
# Disable the experimental web interface.
|
||||||
#no_web_ui = false
|
#no_web_ui = true
|
||||||
|
|
||||||
# Make the provider take the publisher from the CSAF document.
|
# Make the provider take the publisher from the CSAF document.
|
||||||
#dynamic_provider_metadata = false
|
#dynamic_provider_metadata = false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue