From 67a5b18d257cf5495995b7d988e80a92d9a33d3f Mon Sep 17 00:00:00 2001 From: Narender Chopra <36985369+nsgoyat@users.noreply.github.com> Date: Mon, 24 Oct 2022 22:40:35 +0530 Subject: [PATCH] fix prefetch-proxy configuration Seems there is an issue with these changes. This is what the output of `https://www.example.com/.well-known/traffic-advice` looks like with WO 3.15.3 : ``` [\{ "user_agent": "prefetch-proxy", "google_prefetch_proxy_eap": \{ "fraction": 1.0 \} \}] ``` **Here is the expected output for a valid configuration**: ``` [{ "user_agent": "prefetch-proxy", "google_prefetch_proxy_eap": { "fraction": 1.0 } }] ``` --- wo/cli/templates/locations.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wo/cli/templates/locations.mustache b/wo/cli/templates/locations.mustache index 5c2deba..ec9ac0a 100644 --- a/wo/cli/templates/locations.mustache +++ b/wo/cli/templates/locations.mustache @@ -41,7 +41,7 @@ location /.well-known/acme-challenge/ { # https://developer.chrome.com/blog/private-prefetch-proxy/ location /.well-known/traffic-advice { types { } default_type "application/trafficadvice+json; charset=utf-8"; - return 200 "[\{\n \"user_agent\": \"prefetch-proxy\",\n \"google_prefetch_proxy_eap\": \{\n \"fraction\": 1.0\n \}\n\}]"; + return 200 "[{\n \"user_agent\": \"prefetch-proxy\",\n \"google_prefetch_proxy_eap\": {\n \"fraction\": 1.0\n }\n}]"; allow all; } # Return 403 forbidden for readme.(txt|html) or license.(txt|html) or example.(txt|html) or other common git repository files