Skip to content

Commit 85e6240

Browse files
authored
Update README.md
1 parent 6f3ed90 commit 85e6240

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ $.ajax({
112112

113113
```
114114

115-
When using `cache:false` jQuery adds a `_` GET parameter to the URL with the current timestamp to prevent the browser from returning a cached response. This happens *before* the `ajaxSend` event, so in the above case, if you had set `cache:false`, that `_` parameter would just be "moved" to the `X-Proxy-URL` header and no longer have any effect. Instead, leave `cache` at its default value `true`, and add the parameter manually to the proxy url instead, like in the example above.
115+
**Note** When using `cache:false` jQuery adds a `_` GET parameter to the URL with the current timestamp to prevent the browser from returning a cached response. This happens *before* the `ajaxSend` event, so in the above case, if you had set `cache:false`, that `_` parameter would just be "moved" to the `X-Proxy-URL` header and no longer have any effect. Instead, leave `cache` at its default value `true`, and add the parameter manually to the proxy url instead, like in the example above.
116116

117117
*Some more examples can be found in [test/index.html](test/index.html).*
118118

@@ -159,8 +159,13 @@ CrossOriginProxy::proxy([
159159
Cookies
160160
---
161161

162-
Cookies sent to the proxy will be ignored, since the browser will send the ones meant for the domain of the proxy, and not the cookies meant for the proxied resource. Don't want stuff to leak!
162+
Cookies sent to the proxy will be ignored, since the browser will send the ones meant for the domain of the proxy, and not the cookies meant for the proxied resource. So, if a request requires a certain cookie set, for example a session id, you can set the `X-Proxy-Cookie` header which is then used as `Cookie` header by the proxy.
163163

164-
If a request requires a certain cookie set, for example a session id, you can set the `X-Proxy-Cookie` header which is then used as `Cookie` header by the proxy.
165-
166-
X-Proxy-Cookie: jsessionid=AS348AF929FK219CKA9FK3B79870H;
164+
``` JAVASCRIPT
165+
$.ajax({
166+
url: 'https://example.com',
167+
headers: {
168+
'X-Proxy-Cookie': 'jsessionid=AS348AF929FK219CKA9FK3B79870H;',
169+
},
170+
})
171+
```

0 commit comments

Comments
 (0)