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

If we do directory distributions write directory_urls

This commit is contained in:
Sascha L. Teichmann 2022-08-01 07:09:21 +02:00
parent dce3d1f4a7
commit 8e13d37756

View file

@ -131,6 +131,19 @@ func (w *worker) writeProviderMetadata() error {
w.processor.cfg.Domain+"/.well-known/csaf-aggregator/"+w.provider.Name, w.processor.cfg.Domain+"/.well-known/csaf-aggregator/"+w.provider.Name,
w.labelsFromSummaries()) w.labelsFromSummaries())
// Fill in directory URLs if needed.
if w.provider.writeIndices(w.processor.cfg) {
labels := make([]string, 0, len(w.summaries))
for label := range w.summaries {
labels = append(labels, label)
}
sort.Strings(labels)
prefix := w.processor.cfg.Domain + "/.well-known/csaf-aggregator/" + w.provider.Name + "/"
for _, label := range labels {
pm.AddDirectoryDistribution(prefix + label)
}
}
// Figure out the role // Figure out the role
var role csaf.MetadataRole var role csaf.MetadataRole