Skip to content

Commit 33757ec

Browse files
committed
Updated README.md
1 parent 411d041 commit 33757ec

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Installation
2323
Since `proxy.php` is completely self-contained, you can just
2424

2525
1. Copy `proxy.php` into your web application,
26-
2. Edit the $whitelist array,
26+
2. Define the `$whitelist` array,
2727
3. And that's pretty much it...
2828

2929
If using [Composer](http://getcomposer.org), you can also add
@@ -57,10 +57,10 @@ Usage
5757

5858
On the client-side, when performing cross-origin requests:
5959

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`.
6262

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.
6464

6565

6666

@@ -125,7 +125,7 @@ $.ajax({
125125
Security
126126
---
127127

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:
129129

130130
- Exact paths
131131
`['http://example.com/api/specific-method']`

0 commit comments

Comments
 (0)