Improve caching headers for bodhi

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2016-12-21 04:30:04 +00:00
parent 244701ee1c
commit 47f8d5658a

View file

@ -1,18 +1,16 @@
Alias /static /usr/lib/python2.7/site-packages/bodhi/server/static/
<Location /static/>
Header set Cache-Control public
ExpiresDefault "access plus 1 month"
Header unset ETag
</Location>
<FilesMatch ".(eot|ttf|otf|woff)">
# modern browsers require that fonts have this
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
<filesmatch ".(gif|jpe?g|png|css|js|eot|ttf|otf|woff)$">
Header unset Cache-Control
# For now, we have the cache expiry set to 1 hour while we do rapid development.
Header add Cache-Control "max-age=3600"
# Eventually, we want to scale this back to a much longer time frame when things stabilize...
#Header add Cache-Control "max-age=2592000"
</filesmatch>
WSGIDaemonProcess bodhi user=bodhi group=bodhi display-name=bodhi processes={{wsgi_procs}} threads={{wsgi_threads}} maximum-requests=1000
WSGISocketPrefix run/wsgi