commit 46cfc401890429002f8b68719d797d89ead55129 parent 8f2f50d242f875320b1391ad27637709b3b0cae7 Author: Christian Grothoff <christian@grothoff.org> Date: Sun, 22 Jun 2025 13:49:15 +0200 add 'Cache-control: no-store' by default (fixes #9723) Diffstat:
11 files changed, 36 insertions(+), 18 deletions(-)
diff --git a/src/authorization/anastasis_authorization_plugin_email.c b/src/authorization/anastasis_authorization_plugin_email.c @@ -483,7 +483,8 @@ email_challenge (struct ANASTASIS_AUTHORIZATION_State *as, reply, MHD_RESPMEM_MUST_COPY); GNUNET_free (reply); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); GNUNET_break (MHD_YES == MHD_add_response_header (resp, MHD_HTTP_HEADER_CONTENT_TYPE, diff --git a/src/authorization/anastasis_authorization_plugin_file.c b/src/authorization/anastasis_authorization_plugin_file.c @@ -249,7 +249,8 @@ file_challenge (struct ANASTASIS_AUTHORIZATION_State *as, response, MHD_RESPMEM_MUST_COPY); GNUNET_free (response); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); GNUNET_break (MHD_YES == MHD_add_response_header (resp, MHD_HTTP_HEADER_CONTENT_TYPE, diff --git a/src/authorization/anastasis_authorization_plugin_iban.c b/src/authorization/anastasis_authorization_plugin_iban.c @@ -488,7 +488,8 @@ iban_challenge (struct ANASTASIS_AUTHORIZATION_State *as, reply, MHD_RESPMEM_MUST_COPY); GNUNET_free (reply); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); GNUNET_break (MHD_YES == MHD_add_response_header (resp, MHD_HTTP_HEADER_CONTENT_TYPE, diff --git a/src/authorization/anastasis_authorization_plugin_post.c b/src/authorization/anastasis_authorization_plugin_post.c @@ -542,7 +542,8 @@ post_challenge (struct ANASTASIS_AUTHORIZATION_State *as, reply, MHD_RESPMEM_MUST_COPY); GNUNET_free (reply); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); } mres = MHD_queue_response (connection, MHD_HTTP_OK, diff --git a/src/authorization/anastasis_authorization_plugin_sms.c b/src/authorization/anastasis_authorization_plugin_sms.c @@ -473,7 +473,8 @@ sms_challenge (struct ANASTASIS_AUTHORIZATION_State *as, reply, MHD_RESPMEM_MUST_COPY); GNUNET_free (reply); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); GNUNET_break (MHD_YES == MHD_add_response_header (resp, MHD_HTTP_HEADER_CONTENT_TYPE, diff --git a/src/authorization/anastasis_authorization_plugin_totp.c b/src/authorization/anastasis_authorization_plugin_totp.c @@ -310,7 +310,8 @@ totp_solve (struct ANASTASIS_AUTHORIZATION_State *as, resp = MHD_create_response_from_buffer (response_size, response, MHD_RESPMEM_MUST_COPY); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); GNUNET_break (MHD_YES == MHD_add_response_header (resp, MHD_HTTP_HEADER_CONTENT_TYPE, diff --git a/src/backend/anastasis-httpd_policy-upload.c b/src/backend/anastasis-httpd_policy-upload.c @@ -255,7 +255,8 @@ make_payment_request (struct PolicyUploadContext *puc) GNUNET_break (0); return GNUNET_SYSERR; } - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); { char *hdr; const char *pfx; @@ -1005,7 +1006,8 @@ AH_handler_policy_post ( resp = MHD_create_response_from_buffer (0, NULL, MHD_RESPMEM_PERSISTENT); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); GNUNET_break (MHD_YES == MHD_add_response_header (resp, ANASTASIS_HTTP_HEADER_POLICY_VERSION, @@ -1156,7 +1158,8 @@ AH_handler_policy_post ( resp = MHD_create_response_from_buffer (0, NULL, MHD_RESPMEM_PERSISTENT); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); GNUNET_break (MHD_YES == MHD_add_response_header (resp, "Anastasis-Version", @@ -1177,7 +1180,8 @@ AH_handler_policy_post ( resp = MHD_create_response_from_buffer (0, NULL, MHD_RESPMEM_PERSISTENT); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); GNUNET_break (MHD_YES == MHD_add_response_header (resp, ANASTASIS_HTTP_HEADER_POLICY_VERSION, diff --git a/src/backend/anastasis-httpd_policy.c b/src/backend/anastasis-httpd_policy.c @@ -118,7 +118,8 @@ return_policy (struct MHD_Connection *connection, resp = MHD_create_response_from_buffer (res_recovery_data_size, res_recovery_data, MHD_RESPMEM_MUST_FREE); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); { char *sig_s; char *etag; @@ -194,7 +195,8 @@ AH_policy_get (struct MHD_Connection *connection, resp = MHD_create_response_from_buffer (0, NULL, MHD_RESPMEM_PERSISTENT); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); ret = MHD_queue_response (connection, MHD_HTTP_NO_CONTENT, resp); @@ -235,7 +237,8 @@ AH_policy_get (struct MHD_Connection *connection, resp = MHD_create_response_from_buffer (0, NULL, MHD_RESPMEM_PERSISTENT); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); ret = MHD_queue_response (connection, MHD_HTTP_NOT_MODIFIED, resp); diff --git a/src/backend/anastasis-httpd_truth-challenge.c b/src/backend/anastasis-httpd_truth-challenge.c @@ -525,7 +525,8 @@ make_payment_request (struct ChallengeContext *gc) NULL, MHD_RESPMEM_PERSISTENT); GNUNET_assert (NULL != resp); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); { char *hdr; char *order_id; diff --git a/src/backend/anastasis-httpd_truth-solve.c b/src/backend/anastasis-httpd_truth-solve.c @@ -372,7 +372,8 @@ make_payment_request (struct SolveContext *gc) NULL, MHD_RESPMEM_PERSISTENT); GNUNET_assert (NULL != resp); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); { char *hdr; char *order_id; @@ -747,7 +748,8 @@ return_key_share ( resp = MHD_create_response_from_buffer (sizeof (encrypted_keyshare), &encrypted_keyshare, MHD_RESPMEM_MUST_COPY); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); ret = MHD_queue_response (connection, MHD_HTTP_OK, resp); diff --git a/src/backend/anastasis-httpd_truth-upload.c b/src/backend/anastasis-httpd_truth-upload.c @@ -180,7 +180,8 @@ make_payment_request (struct TruthUploadContext *tuc) NULL, MHD_RESPMEM_PERSISTENT); GNUNET_assert (NULL != resp); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); { char *hdr; const char *pfx; @@ -771,7 +772,8 @@ AH_handler_truth_post ( resp = MHD_create_response_from_buffer (0, NULL, MHD_RESPMEM_PERSISTENT); - TALER_MHD_add_global_headers (resp); + TALER_MHD_add_global_headers (resp, + false); ret = MHD_queue_response (connection, MHD_HTTP_NO_CONTENT, resp);