commit 8f2f50d242f875320b1391ad27637709b3b0cae7
parent 11730abb60db476f822732110c40afb87be77448
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 16 Jun 2025 23:13:51 +0200
implement #10109: remove cache control from /config
Diffstat:
1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/src/backend/anastasis-httpd_config.c b/src/backend/anastasis-httpd_config.c
@@ -79,32 +79,12 @@ AH_handler_config (struct AH_RequestHandler *rh,
struct MHD_Connection *connection)
{
static struct MHD_Response *response;
- static struct GNUNET_TIME_Absolute a;
- if ( (GNUNET_TIME_absolute_is_past (a)) &&
- (NULL != response) )
- {
- MHD_destroy_response (response);
- response = NULL;
- }
if (NULL == response)
{
json_t *method_arr = json_array ();
- struct GNUNET_TIME_Timestamp km;
- char dat[128];
GNUNET_assert (NULL != method_arr);
- a = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_DAYS);
- /* Round up to next full day to ensure the expiration
- time does not become a fingerprint! */
- a = GNUNET_TIME_absolute_round_down (a,
- GNUNET_TIME_UNIT_DAYS);
- a = GNUNET_TIME_absolute_add (a,
- GNUNET_TIME_UNIT_DAYS);
- /* => /config response stays at most 48h in caches! */
- km = GNUNET_TIME_absolute_to_timestamp (a);
- TALER_MHD_get_date_string (km.abs_time,
- dat);
{
json_t *method;
@@ -126,7 +106,7 @@ AH_handler_config (struct AH_RequestHandler *rh,
GNUNET_JSON_pack_string ("name",
"anastasis"),
GNUNET_JSON_pack_string ("version",
- "0:2:0"),
+ "0:3:0"),
GNUNET_JSON_pack_string ("implementation",
"urn:net:taler:specs:anastasis:c-reference"),
GNUNET_JSON_pack_string ("business_name",
@@ -143,14 +123,6 @@ AH_handler_config (struct AH_RequestHandler *rh,
&AH_insurance),
GNUNET_JSON_pack_data_auto ("provider_salt",
&AH_provider_salt));
- GNUNET_break (MHD_YES ==
- MHD_add_response_header (response,
- MHD_HTTP_HEADER_EXPIRES,
- dat));
- GNUNET_break (MHD_YES ==
- MHD_add_response_header (response,
- MHD_HTTP_HEADER_CACHE_CONTROL,
- "public,max-age=21600")); /* 6h */
}
return MHD_queue_response (connection,
MHD_HTTP_OK,