From 47ac4f980f489e1eb402ff88794d8fe7e43ff285 Mon Sep 17 00:00:00 2001
From: autodeploy <benoit@startinblox.com>
Date: Mon, 10 Jun 2024 17:46:52 +0200
Subject: [PATCH] fix: cache-control

---
 djangoldp/views.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/djangoldp/views.py b/djangoldp/views.py
index 867a658a..f88516df 100644
--- a/djangoldp/views.py
+++ b/djangoldp/views.py
@@ -630,6 +630,11 @@ def serve_static_content(request, path):
             content = file.read()
 
         json_content = json.loads(content)
-        return JsonResponse(json_content, safe=False, status=200, content_type='application/ld+json', headers={'Access-Control-Allow-Origin': '*'})
+        return JsonResponse(json_content, safe=False, status=200,
+                            content_type='application/ld+json',
+                            headers={
+                              'Access-Control-Allow-Origin': '*',
+                              'Cache-Control': 'public, max-age=3600',
+                            })
     else:
         return HttpResponseNotFound('File not found')
-- 
GitLab