Skip to content

Commit

Permalink
Merge pull request #954 from chainguard-dev/nginx-vulnerabilities-rew…
Browse files Browse the repository at this point in the history
…rite

Add nginx rewrite for root /vulnerabilities/ url
  • Loading branch information
ltagliaferri authored Aug 27, 2023
2 parents afa458f + 2a1397f commit ea818ae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ http {
try_files $uri $uri/index.html =404;
}

# serve the vuln-comparison page for /vulnerabilities page without a vuln id
# captures /vulnerabilities /vulnerabilities/ and /vulnerabilities/index.html
location ~ ^/vulnerabilities(\/|\/index.html)?$ {
rewrite ^ /chainguard/chainguard-images/vuln-comparison/index.html;
}

# all vulnerabilities with an ID get rendered by this page using javascript
location ~ ^/vulnerabilities/ {
rewrite ^ /vulnerabilities/index.html break;
}
Expand Down

0 comments on commit ea818ae

Please sign in to comment.