From: Vladimír Čunát Date: Mon, 10 Jan 2022 17:07:44 +0000 (+0100) Subject: doh2: fix CORS by adding `access-control-allow-origin: *` X-Git-Tag: v5.5.0~22^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4269d3d64752f8465d55d5b571ff9e3cdb32d0e5;p=thirdparty%2Fknot-resolver.git doh2: fix CORS by adding `access-control-allow-origin: *` For old doh we added this in commit a34aa1ee743; with the new implementation we somehow forgot. --- diff --git a/NEWS b/NEWS index c31550a6e..89d8aa96e 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,10 @@ Incompatible changes -------------------- - libknot >= 3.0.2 is required +Bugfixes +-------- +- doh2: fix CORS by adding `access-control-allow-origin: *` (!1246) + Knot Resolver 5.4.4 (2022-01-05) ================================ diff --git a/daemon/http.c b/daemon/http.c index f340d86a5..0f9551d28 100644 --- a/daemon/http.c +++ b/daemon/http.c @@ -695,6 +695,7 @@ static int http_send_response(struct http_ctx *ctx, int32_t stream_id, nghttp2_nv hdrs[] = { MAKE_STATIC_NV(":status", "200"), MAKE_STATIC_NV("content-type", "application/dns-message"), + MAKE_STATIC_NV("access-control-allow-origin", "*"), MAKE_NV("content-length", 14, size, size_len), MAKE_NV("cache-control", 13, max_age, max_age_len), };