You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Installation
23
23
Since `proxy.php` is completely self-contained, you can just
24
24
25
25
1. Copy `proxy.php` into your web application,
26
-
2.Edit the $whitelist array,
26
+
2.Define the `$whitelist` array,
27
27
3. And that's pretty much it...
28
28
29
29
If using [Composer](http://getcomposer.org), you can also add
@@ -57,10 +57,10 @@ Usage
57
57
58
58
On the client-side, when performing cross-origin requests:
59
59
60
-
1. Make `url` point to the `proxy.php` script
61
-
2. Set the HTTP header `X-Proxy-URL` to whatever URL you're calling, for example `http://api.example.com/some/path`
60
+
1. Make `url` point to the `proxy.php` script.
61
+
2. Set the HTTP header `X-Proxy-URL` to whatever URL you're calling, for example `http://api.example.com/some/path`.
62
62
63
-
All parameters and HTTP headers (except `Cookie`, `Host`and `X-Proxy-URL`) will be used to recreate the request and performed server-side by the proxy. When complete it will mirror the response, including headers, and return it to the client-side script more or less as if it had been called directly.
63
+
All parameters and HTTP headers (except `Cookie`and `Host`) will be used to recreate the request and performed server-side by the proxy. When complete it will mirror the response, including headers, and return it to the client-side script more or less as if it had been called directly.
64
64
65
65
66
66
@@ -125,7 +125,7 @@ $.ajax({
125
125
Security
126
126
---
127
127
128
-
The hostname of the referer is checked, but can be easily spoofed, so the whitelist array should be put to good use. Fill it with any number of the following types of criterias:
128
+
Although the hostname of the referer is checked, that's easily spoofed, so security-wise there's only so much one can do. What should be done though is to define the whitelist. Fill it with any number of the following types of criterias:
0 commit comments