copr: do not cache logs and repodata in CloudFront

This commit is contained in:
Miroslav Suchý 2020-02-04 12:37:43 +01:00 committed by Pierre-Yves Chibon
parent fa78bc5192
commit c35ebbd949
2 changed files with 10 additions and 0 deletions

View file

@ -499,5 +499,10 @@ $HTTP["url"] !~ "^/archive/spacewalk($|/)" {
# https://pagure.io/copr/copr/issue/762
$HTTP["url"] =~ "\.log$" {
setenv.add-response-header = ( "Cache-Control" => "no-store")
mimetype.assign = ("" => "text/plain; charset=utf-8" )
}
$HTTP["url"] =~ "/repodata/*" {
setenv.add-response-header = ( "Cache-Control" => "no-cache")
}

View file

@ -506,9 +506,14 @@ $HTTP["url"] =~ "\.log\.gz$" {
# https://pagure.io/copr/copr/issue/762
$HTTP["url"] =~ "\.log$" {
setenv.add-response-header = ( "Cache-Control" => "no-store")
mimetype.assign = ("" => "text/plain; charset=utf-8" )
}
$HTTP["url"] =~ "/repodata/*" {
setenv.add-response-header = ( "Cache-Control" => "no-cache")
}
url.redirect = (
"^/results/(.*)/(.*)/mageia-(.*)-i386(.*)" => "/results/$1/$2/mageia-$3-i586$4",
"^/(.*)/redirect-live.log$" => "/$1/builder-live.log.gz"