Skip to content

Commit 5763c55

Browse files
committed
Change codeblock format
1 parent cfe9f83 commit 5763c55

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,28 @@ The proxy is indentionally limited to a single file. All you have to do is to pl
1010

1111
Whenever you want to make a cross domain request, just make a request to http://www.yourdomain.com/ajax-proxy.php and specify the cross domain URL by using `csurl` parameter. Obviously, you can add more parameters according to your needs; note that the rest of the parameters will be used in the cross domain request. For instance, if you are using jQuery:
1212

13-
$('#target').load(
14-
'http://www.yourdomain.com/ajax-proxy.php', {
15-
csurl: 'http://www.cross-domain.com/',
16-
param1: value1,
17-
param2: value2
18-
}
19-
);
13+
``` JAVASCRIPT
14+
$('#target').load(
15+
'http://www.yourdomain.com/ajax-proxy.php', {
16+
csurl: 'http://www.cross-domain.com/',
17+
param1: value1,
18+
param2: value2
19+
}
20+
);
21+
```
2022

2123
It’s worth mentioning that both POST and GET methods work and headers are taken into consideration. That is to say, headers sent from browser to proxy are used in the cross domain request and vice versa.
2224

2325
Configuration
2426
--------------
2527

2628
For security reasons don't forget to define all the valid requests into top section of `proxy.php` file:
27-
28-
$valid_requests = array(
29-
'http://www.domainA.com/',
30-
'http://www.domainB.com/path-to-services/service-a'
31-
);
3229

30+
``` JAVASCRIPT
31+
$valid_requests = array(
32+
'http://www.domainA.com/',
33+
'http://www.domainB.com/path-to-services/service-a'
34+
);
35+
```
3336

34-
37+

0 commit comments

Comments
 (0)