add taler-terms-version header

This commit is contained in:
Swrup 2025-09-28 18:23:43 +02:00
parent bed6e3fec1
commit 0a0eac7cd9

View file

@ -34,10 +34,9 @@ module Static = struct
- and finally apply compression if that is allowed by the client
- set ETAG header
- If it did not change, a "304 Not Modified" response will be returned
- A "Taler-Terms-Version" header is generated to indicate the legal version of the terms
TODO:
- The ETAG is encoded in Crockford base-32
- A "Taler-Terms-Version" header is generated to indicate the legal version of the terms
- When returning a full response (not a "304 Not Modified"), the server
should also include a "Avail-Languages" header which includes a
comma-separated list of the languages in which the terms of service are available in
@ -71,6 +70,11 @@ module Static = struct
let* () = Vif.Response.with_string ?compression req data in
let etag_field_value = Headers.Etag.to_field_value etag in
let* () = Vif.Response.add ~field:"etag" etag_field_value in
let* () =
(* todo: is it "taler-privacy-version" for /policy ? *)
Vif.Response.add ~field:"taler-terms-version"
Config.terms_legal_version
in
(* TODO content-type *)
let* () =
Vif.Response.add ~field:"content-type" "html; charset=utf-8"