mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-06 09:57:57 +00:00
Exclude security notices with no CVE from list of CVEs in sitemap
Otherwise we're instructing google and others to index pages that don't exist.
This commit is contained in:
@ -5,5 +5,5 @@ from .models import SecurityPatch
|
||||
def get_struct():
|
||||
"""create sitemap entries for each CVE entry and the top level CVE URL"""
|
||||
yield ('support/security/', None)
|
||||
for s in SecurityPatch.objects.filter(public=True).order_by('-cvenumber'):
|
||||
for s in SecurityPatch.objects.filter(public=True).exclude(cve='').order_by('-cvenumber'):
|
||||
yield ('support/security/CVE-{}'.format(s.cve), None)
|
||||
|
Reference in New Issue
Block a user