doc:appunti:linux:sa:proxy_debug
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:linux:sa:proxy_debug [2011/09/15 17:41] – niccolo | doc:appunti:linux:sa:proxy_debug [2011/09/15 17:45] (current) – niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Substitute HTML or JavaScript | + | ====== Substitute HTML or JavaScript |
- | Using this recipe - while browsing a remote server - you can trick your browser into taking one file (JavaScript, | + | Using this recipe - while browsing a remote server - you can trick your browser into taking one file (JavaScript, |
This can be useful to test some changes on a production server without actually touching the deployed code. | This can be useful to test some changes on a production server without actually touching the deployed code. | ||
+ | |||
+ | It works by telling the browser to use a proxy for a particular URL, and configure a fake web server to serve that content, eventually canged. | ||
Create a file **'' | Create a file **'' | ||
Line 10: | Line 12: | ||
function FindProxyForURL(url, | function FindProxyForURL(url, | ||
if (shExpMatch(url, | if (shExpMatch(url, | ||
- | return "PROXY your.server.org: | + | return "PROXY your.server.org: |
} | } | ||
} | } | ||
Line 41: | Line 43: | ||
Configure the browser to use automatic proxy configuration, | Configure the browser to use automatic proxy configuration, | ||
- | **NOTE:** This trick does not work with Internet Explorer, because it caches the proxy configuration on a per-server basis. If one page from the server was got via proxy, all the subsequent pages will be too. | + | **NOTE:** This trick **does not work with Internet Explorer**, because it caches the proxy configuration on a per-server basis. If one page from the server was got via proxy, all the subsequent pages will be too. |
doc/appunti/linux/sa/proxy_debug.txt · Last modified: 2011/09/15 17:45 by niccolo