From 3db8f0f22d0a7c1710b4c4f9097103b124c58971 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 16 May 2022 11:56:10 +0200 Subject: improve cache control support for /wire, /keys and legal --- src/exchange/taler-exchange-httpd_wire.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/exchange/taler-exchange-httpd_wire.c') diff --git a/src/exchange/taler-exchange-httpd_wire.c b/src/exchange/taler-exchange-httpd_wire.c index e2baa1ce7..aa187c1cf 100644 --- a/src/exchange/taler-exchange-httpd_wire.c +++ b/src/exchange/taler-exchange-httpd_wire.c @@ -483,6 +483,17 @@ build_wire_state (void) wsh->dat)); } TALER_MHD_add_global_headers (wsh->wire_reply); + /* Set cache control headers: our response varies depending on these headers */ + GNUNET_break (MHD_YES == + MHD_add_response_header (wsh->wire_reply, + MHD_HTTP_HEADER_VARY, + MHD_HTTP_HEADER_ACCEPT_ENCODING)); + /* Information is always public, revalidate after 1 day */ + GNUNET_break (MHD_YES == + MHD_add_response_header (wsh->wire_reply, + MHD_HTTP_HEADER_CACHE_CONTROL, + "public,max-age=86400")); + { struct GNUNET_HashCode h; char etag[sizeof (h) * 2]; -- cgit v1.2.3