From: Fabian Keil Date: Mon, 26 Aug 2019 11:34:55 +0000 (+0200) Subject: Document the cors-allowed-origin directive X-Git-Tag: v_3_0_29~609 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=2ffad2c58cd9db229d50c5c84ed1a66005df4ecd;hp=9fd58c0d3a56323ce94837f217e6609e9c7b2402 Document the cors-allowed-origin directive --- diff --git a/doc/source/p-config.sgml b/doc/source/p-config.sgml index ba974539..ce1c4ade 100644 --- a/doc/source/p-config.sgml +++ b/doc/source/p-config.sgml @@ -1983,6 +1983,11 @@ ACLs: permit-access and deny-access Requests are accepted if the specified trusted-cgi-refer is the prefix of the Referer. + + If the trusted source is supposed to access the CGI pages via + JavaScript the cors-allowed-origin + option can be used. + Declaring pages the admin doesn't control trustworthy may allow @@ -1997,6 +2002,74 @@ ACLs: permit-access and deny-access @@#trusted-cgi-referer http://www.example.org/local-privoxy-control-page]]> + + +cors-allowed-origin + + + Specifies: + + + A trusted website which can access &my-app;'s CGI pages through JavaScript. + + + + + Type of value: + + URL + + + + Default value: + + Unset + + + + Effect if unset: + + + No external sites get access via cross-origin resource sharing. + + + + + Notes: + + + Modern browsers by default prevent cross-origin requests made + via JavaScript to &my-app;'s CGI interface even if &my-app; + would trust the referer because it's white listed via the + trusted-cgi-referer + directive. + + + Cross-origin resource sharing (CORS) is a mechanism to allow + cross-origin requests. + + + The cors-allowed-origin option can be used to specify + a domain that is allowed to make requests to Privoxy CGI interface + via JavaScript. It is used in combination with the + trusted-cgi-referer + directive. + + + + Declaring domains the admin doesn't control trustworthy may allow + malicious third parties to modify Privoxy's internal state against + the user's wishes and without the user's knowledge. + + + + + + +@@#cors-allowed-origin http://www.example.org/]]> + +