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

Write correct url prefix to provider-metadata.

This commit is contained in:
Sascha L. Teichmann 2022-05-19 12:22:06 +02:00
parent a2d96872e1
commit a50ed4ab01
3 changed files with 10 additions and 6 deletions

View file

@ -144,7 +144,7 @@ func (w *worker) writeROLIE(label string, summaries []summary) error {
fname := "csaf-feed-tlp-" + labelFolder + ".json"
feedURL := w.cfg.Domain + "/.well-known/csaf-aggregator/" +
w.provider.Name + "/" + fname
w.provider.Name + "/" + labelFolder + "/" + fname
entries := make([]*csaf.Entry, len(summaries))
@ -199,7 +199,7 @@ func (w *worker) writeROLIE(label string, summaries []summary) error {
// Sort by descending updated order.
rolie.SortEntriesByUpdated()
path := filepath.Join(w.dir, fname)
path := filepath.Join(w.dir, labelFolder, fname)
return util.WriteToFile(path, rolie)
}

View file

@ -203,8 +203,8 @@ func (w *worker) writeProviderMetadata() error {
fname := filepath.Join(w.dir, "provider-metadata.json")
pm := csaf.NewProviderMetadataDomain(
w.cfg.Domain,
pm := csaf.NewProviderMetadataPrefix(
w.cfg.Domain+"/.well-known/csaf-aggreator/"+w.provider.Name,
w.labelsFromSummaries())
// Figure out the role