diff --git a/app.py b/app.py index 76fe05f..39f8f90 100644 --- a/app.py +++ b/app.py @@ -793,6 +793,10 @@ def set_security_headers(response): response.headers['Referrer-Policy'] = 'strict-origin-when-cross-origin' response.headers['Permissions-Policy'] = 'camera=(), microphone=(), geolocation=(self)' + # Cache static assets (CSS, JS, images, fonts) + if request.path.startswith('/static/'): + response.headers['Cache-Control'] = 'public, max-age=2592000' # 30 days + # Freshness signal for SEO crawlers if response.content_type and 'text/html' in response.content_type and 'Last-Modified' not in response.headers: from email.utils import formatdate diff --git a/templates/base.html b/templates/base.html index bfd59ab..0bdbe56 100755 --- a/templates/base.html +++ b/templates/base.html @@ -1544,7 +1544,7 @@