Skip to content

Commit

Permalink
fix: ignore proxy headers content-md4 and content-type (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Jun 6, 2020
1 parent 8ae0cd5 commit 4152f87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function httpModule (_moduleOptions) {
baseURL: `http://${defaultHost}:${defaultPort}${prefix}`,
browserBaseURL: undefined,
proxyHeaders: true,
proxyHeadersIgnore: ['accept', 'host', 'cf-ray', 'cf-connecting-ip', 'content-length'],
proxyHeadersIgnore: ['accept', 'host', 'cf-ray', 'cf-connecting-ip', 'content-length', 'content-md5', 'content-type'],
proxy: false,
retry: false,
serverTimeout: false,
Expand Down
2 changes: 1 addition & 1 deletion test/defaults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('defaults', () => {
expect(options.clientTimeout).toBe(false)
expect(options.serverTimeout).toBe(false)
expect(options.proxyHeaders).toBe(true)
expect(options.proxyHeadersIgnore).toStrictEqual(['accept', 'host', 'cf-ray', 'cf-connecting-ip', 'content-length'])
expect(options.proxyHeadersIgnore).toStrictEqual(['accept', 'host', 'cf-ray', 'cf-connecting-ip', 'content-length', 'content-md5', 'content-type'])
expect(options.https).toBe(false)
expect(options.retry).toBe(0)
})
Expand Down

0 comments on commit 4152f87

Please sign in to comment.