Skip to content

Commit 804cc13

Browse files
committed
Update README. Update failing test handling cookie parameter
1 parent d4bc685 commit 804cc13

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ $ npm install -D json-caching-proxy
3535
-I, --header [header] change the response header property for identifying cached responses
3636
-l, --log print log output to console
3737
-t, --timeout change the timeout for proxy server
38+
-d, --deleteCookieDomain Remove the Domain portion of all cookies
3839
```
3940

4041
#### Example - basic JSON caching with output
@@ -106,7 +107,8 @@ let jsonCachingProxy = new JsonCachingProxy({
106107
dataPlayback: true,
107108
dataRecord: true,
108109
showConsoleOutput: false,
109-
proxyTimeout: 500000
110+
proxyTimeout: 500000,
111+
deleteCookieDomain: true
110112
});
111113

112114
jsonCachingProxy.start();

bin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ program
3434
.option('-I, --header [header]', 'change the response header property for identifying cached responses')
3535
.option('-l, --log', 'print log output to console')
3636
.option('-t, --timeout [number]', 'proxy timeout in milliseconds', parseInt)
37-
.option('-d, --deleteCookieDoman', 'Remove the Domain portion of all cookies')
37+
.option('-d, --deleteCookieDomain', 'Remove the Domain portion of all cookies')
3838
.parse(process.argv);
3939

4040
let configOptions = {};
@@ -96,8 +96,8 @@ let jsonCachingProxy = new JsonCachingProxy({
9696
dataRecord,
9797
commandPrefix,
9898
proxyHeaderIdentifier,
99-
showConsoleOutput,
100-
proxyTimeout,
99+
showConsoleOutput,
100+
proxyTimeout,
101101
deleteCookieDomain
102102
});
103103

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class JsonCachingProxy {
2626
dataRecord: true,
2727
showConsoleOutput: false,
2828
proxyTimeout: 3600000, // one hour
29-
deleteCookieDomain: false,
29+
deleteCookieDomain: false, // Removes the domain portion from all cookies
3030
};
3131

3232
// Ignore undefined values and combine the options with defaults

test/index.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ describe('json-caching-proxy', () => {
3636
dataPlayback: true,
3737
dataRecord: true,
3838
showConsoleOutput: false,
39-
proxyTimeout: proxyTimeout
39+
proxyTimeout: proxyTimeout,
40+
deleteCookieDomain: false
4041
};
4142
});
4243

0 commit comments

Comments
 (0)