File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 2222 //if(options.crossDomain)
2323 {
2424 jqxhr . setRequestHeader ( 'X-Proxy-URL' , options . url ) ;
25- options . url = '../ proxy.php' ;
25+ options . url = 'proxy.php' ;
2626 options . url += '?_=' + Date . now ( ) ;
2727 }
2828 }
@@ -38,7 +38,7 @@ <h2>Examples</h2>
3838 < pre class ="prettyprint " style ="border:0;padding:0 ">
3939// GET, no parameters
4040$.ajax({
41- url: 'http://localhost/php-cross-domain-proxy/test/echo.php ',
41+ url: 'http://example.com ',
4242})
4343
4444// GET, with custom header and some parameters using both url and data property
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ require '../vendor/autoload.php ' ;
4+
5+ CrossOriginProxy::proxy ([
6+ // Exact matching
7+ ['http://www.yr.no/place/Sweden/Stockholm/Stockholm/forecast.xml ' ],
8+
9+ // URL component matching
10+ ['host ' => 'localhost ' ],
11+ ['host ' => 'example.com ' , 'scheme ' => 'http ' ],
12+
13+ // Regex matching
14+ ['regex ' => '%^http://www.yr.no/place/Norway/% ' ],
15+
16+ ]);
You can’t perform that action at this time.
0 commit comments