aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-08-05 19:43:50 +0100
committerChristopher Baines <mail@cbaines.net>2019-08-05 19:43:50 +0100
commit70126f7ed0babca5af1ba98296979a4aeaeac991 (patch)
tree62a420777fc2bb4d3394de4119bc66e7fdd712c6
parent8f7398b8144db5fe58f96416df0983b8f115ac18 (diff)
downloaddata-service-70126f7ed0babca5af1ba98296979a4aeaeac991.tar
data-service-70126f7ed0babca5af1ba98296979a4aeaeac991.tar.gz
Set the Vary header to a sensible default value
As most pages vary based on the Accept header.
-rw-r--r--guix-data-service/web/render.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix-data-service/web/render.scm b/guix-data-service/web/render.scm
index 5b0ff7a..7047174 100644
--- a/guix-data-service/web/render.scm
+++ b/guix-data-service/web/render.scm
@@ -87,7 +87,8 @@
(list (build-response
#:code code
#:headers (append extra-headers
- '((content-type . (text/html)))))
+ '((content-type . (text/html))
+ (vary . (accept)))))
(lambda (port)
(sxml->html sxml port))))
@@ -96,7 +97,8 @@
(list (build-response
#:code code
#:headers (append extra-headers
- '((content-type . (application/json)))))
+ '((content-type . (application/json))
+ (vary . (accept)))))
(lambda (port)
(scm->json json port))))