Skip to content

Commit d7aa01d

Browse files
pstephan9chimurai
andauthored
docs(proxy-events.md): fix example (#921)
* Update proxy-events.md The notation {'a', b} isn't syntactically correct nowadays, preferring {a: b} * docs(proxy-events.md): fix prettier linting --------- Co-authored-by: chimurai <655241+chimurai@users.noreply.github.com>
1 parent cd58f96 commit d7aa01d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

recipes/proxy-events.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const onProxyReq = function (proxyReq, req, res) {
3636

3737
const options = {
3838
target: 'http://localhost:3000',
39-
on: { 'proxyReq', onProxyReq }
39+
on: { proxyReq: onProxyReq },
4040
};
4141

4242
const apiProxy = createProxyMiddleware(options);
@@ -56,7 +56,7 @@ const onProxyReqWs = function (proxyReq, req, socket, options, head) {
5656

5757
const options = {
5858
target: 'http://localhost:3000',
59-
on: { 'proxyReqWs', onProxyReqWs }
59+
on: { proxyReqWs: onProxyReqWs },
6060
};
6161

6262
const apiProxy = createProxyMiddleware(options);
@@ -79,7 +79,7 @@ const onProxyRes = function (proxyRes, req, res) {
7979

8080
const options = {
8181
target: 'http://localhost:3000',
82-
on: { 'proxyRes', onProxyRes }
82+
on: { proxyRes: onProxyRes },
8383
};
8484

8585
const apiProxy = createProxyMiddleware(options);

0 commit comments

Comments
 (0)