From 47f8d5658a704ece92d4446b1872b3d61f93dd78 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 21 Dec 2016 04:30:04 +0000 Subject: [PATCH] Improve caching headers for bodhi Signed-off-by: Patrick Uiterwijk --- roles/bodhi2/base/templates/bodhi-app.conf | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/roles/bodhi2/base/templates/bodhi-app.conf b/roles/bodhi2/base/templates/bodhi-app.conf index 00a1216ff3..3a88cdc052 100644 --- a/roles/bodhi2/base/templates/bodhi-app.conf +++ b/roles/bodhi2/base/templates/bodhi-app.conf @@ -1,18 +1,16 @@ Alias /static /usr/lib/python2.7/site-packages/bodhi/server/static/ + + Header set Cache-Control public + ExpiresDefault "access plus 1 month" + Header unset ETag + + # modern browsers require that fonts have this Header set Access-Control-Allow-Origin "*" - - 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" - - WSGIDaemonProcess bodhi user=bodhi group=bodhi display-name=bodhi processes={{wsgi_procs}} threads={{wsgi_threads}} maximum-requests=1000 WSGISocketPrefix run/wsgi