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

add setup options to provider docs

* Add a first description of the config options for csaf_provider.
 * Change option name from `domain` to `canonical_prefix_url`
    to make the usage more intuitively. Use`https` in the default,
    if unset.

resolve #32 

Co-authored-by: Bernhard E. Reiter <bernhard@intevation.de>
Co-authored-by: tschmidtb51 <65305130+tschmidtb51@users.noreply.github.com>
This commit is contained in:
Fadi Abbud 2022-03-23 19:48:05 +01:00 committed by GitHub
parent 4fae2ec627
commit 5e1f2092e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 14 deletions

View file

@ -219,7 +219,8 @@ func (c *controller) upload(r *http.Request) (interface{}, error) {
}
feedURL := csaf.JSONURL(
c.cfg.Domain + "/.well-known/csaf/" + ts + "/" + feedName)
c.cfg.CanonicalURLPrefix +
"/.well-known/csaf/" + ts + "/" + feedName)
tlpLabel := csaf.TLPLabel(strings.ToUpper(ts))
@ -241,7 +242,7 @@ func (c *controller) upload(r *http.Request) (interface{}, error) {
year := strconv.Itoa(ex.InitialReleaseDate.Year())
csafURL := c.cfg.Domain +
csafURL := c.cfg.CanonicalURLPrefix +
"/.well-known/csaf/" + ts + "/" + year + "/" + newCSAF
e := rolie.EntryByID(ex.ID)