[Privoxy-users] Prevent Privoxy from Filtering Localhost
Vanderdenduur
rvrnt at icloud.com
Sat Dec 31 11:50:44 UTC 2016
Hello,
I created a rule to redirect common JS requests to the local versions
installed in a folder called CommonJS.
Here’s the ruleset:
|# {
+redirect{s@^(https?://)?(?!localhost)[^,%]*(?!/CommonJS/)\b(angular|backbone|dojo|ember|ext-core|jquery.ui(.min)?|jquery.min|modernizr.min|mootools-yui-compressed|prototype|scriptaculous|swfobject|underscore-min)\b[^/]*\.js[^,%]*@http://localhost/~Nathalie/CommonJS/$2.js@}
} # github.com/Synzvato/decentraleyes/tree/master/data/resources
/[^,%]*(?!/CommonJS/)\b(angular|backbone|dojo|ember|ext-core|jquery.ui(.min)?|jquery.min|modernizr.min|mootools-yui-compressed|prototype|scriptaculous|swfobject|underscore-min)\b[^/]*\.js[^,%]*
|
I tried to make it simpler…
Unfortunately, at some point, Privoxy attempts to re-analyse the local
version too, which I don’t want.
Here’s the log version:
|2016-12-31 11:08:45.163 00000128 Redirect: pcrs command
"s@^(https?://)?(?!localhost)[^,%]*(?!/CommonJS/)\b(angular|backbone|dojo|ember|ext-core|jquery.ui(.min)?|jquery.min|modernizr.min|mootools-yui-compressed|prototype|scriptaculous|swfobject|underscore-min)\b[^/]*\.js[^,%]*@http://localhost/~Nathalie/CommonJS/$2.js@"
changed
"http://www.some_site/scripts/jquery-ui-1.11.0.custom/jquery-ui.min.js"
to "http://localhost/~Nathalie/CommonJS/jquery-ui.min.js" (1 hit).
2016-12-31 11:08:45.163 00000128 Redirect: New URL is:
http://localhost/~Nathalie/CommonJS/jquery-ui.min.js 2016-12-31
11:08:45.163 00000128 Crunch: Redirected:
http://www.some_site/scripts/jquery-ui-1.11.0.custom/jquery-ui.min.js
127.0.0.1 - - [31/Dec/2016:11:08:45 +0000] "GET
http://www.some_site/scripts/jquery-ui-1.11.0.custom/jquery-ui.min.js
HTTP/1.1" 302 0 2016-12-31 11:08:45.237 000000b0 Redirect: pcrs command
"s@^(https?://)?(?!localhost)[^,%]*(?!/CommonJS/)\b(angular|backbone|dojo|ember|ext-core|jquery.ui(.min)?|jquery.min|modernizr.min|mootools-yui-compressed|prototype|scriptaculous|swfobject|underscore-min)\b[^/]*\.js[^,%]*@http://localhost/~Nathalie/CommonJS/$2.js@"
changed "http://localhost/~Nathalie/CommonJS/jquery-ui.min.js" to
"http://localhost/~Nathalie/CommonJS/jquery-ui.min.js" (1 hit).
2016-12-31 11:08:45.237 000000b0 Error: New URL
"http://localhost/~Nathalie/CommonJS/jquery-ui.min.js" and old URL
"http://localhost/~Nathalie/CommonJS/jquery-ui.min.js" are the same.
Redirection loop prevented. 2016-12-31 11:08:45.237 000000b0 Request:
localhost/~Nathalie/CommonJS/jquery-ui.min.js |
In particular, I see (from above)
|2016-12-31 11:08:45.237 000000b0 Error: New URL
"http://localhost/~Nathalie/CommonJS/jquery-ui.min.js" and old URL
"http://localhost/~Nathalie/CommonJS/jquery-ui.min.js" are the same.
Redirection loop prevented. |
Is there a way to not allow Privoxy analyse data hosted on localhost? I
have put |localhost| in { -filter } and have inserted the
|(?!localhost)| in the ruleset to prevent Privoxy from analysing
localhost request, but with no effect.
Afterwards, when this “error” occurs, Privoxy goes crazy cruising at
full CPU.
Thanks for your support,
Vanderdenduur
More information about the Privoxy-users
mailing list