summaryrefslogtreecommitdiff
path: root/src/mhd
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-05-16 11:56:10 +0200
committerChristian Grothoff <christian@grothoff.org>2022-05-16 11:56:10 +0200
commit3db8f0f22d0a7c1710b4c4f9097103b124c58971 (patch)
treee2df57484740dc13d63007dc41b9ad23b0fcb680 /src/mhd
parentfac01f140fbbb5c95bd090ad1cdfee3d89f056ba (diff)
downloadexchange-3db8f0f22d0a7c1710b4c4f9097103b124c58971.tar.gz
exchange-3db8f0f22d0a7c1710b4c4f9097103b124c58971.tar.bz2
exchange-3db8f0f22d0a7c1710b4c4f9097103b124c58971.zip
improve cache control support for /wire, /keys and legal
Diffstat (limited to 'src/mhd')
-rw-r--r--src/mhd/mhd_legal.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mhd/mhd_legal.c b/src/mhd/mhd_legal.c
index bd596862c..5082c1811 100644
--- a/src/mhd/mhd_legal.c
+++ b/src/mhd/mhd_legal.c
@@ -306,7 +306,18 @@ TALER_MHD_reply_legal (struct MHD_Connection *conn,
MHD_add_response_header (resp,
MHD_HTTP_HEADER_EXPIRES,
dat));
-
+ /* Set cache control headers: our response varies depending on these headers */
+ GNUNET_break (MHD_YES ==
+ MHD_add_response_header (resp,
+ MHD_HTTP_HEADER_VARY,
+ MHD_HTTP_HEADER_ACCEPT_LANGUAGE ","
+ MHD_HTTP_HEADER_ACCEPT ","
+ MHD_HTTP_HEADER_ACCEPT_ENCODING));
+ /* Information is always public, revalidate after 10 days */
+ GNUNET_break (MHD_YES ==
+ MHD_add_response_header (resp,
+ MHD_HTTP_HEADER_CACHE_CONTROL,
+ "public max-age=864000"));
if (NULL != legal)
GNUNET_break (MHD_YES ==
MHD_add_response_header (resp,