fix: ignore proxy headers `content-md4` and `content-type` (#107)

master
Ricardo Gobbo de Souza 2020-06-06 15:03:37 -03:00 committed by GitHub
parent 8ae0cd5655
commit 4152f874a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ function httpModule (_moduleOptions) {
baseURL: `http://${defaultHost}:${defaultPort}${prefix}`, baseURL: `http://${defaultHost}:${defaultPort}${prefix}`,
browserBaseURL: undefined, browserBaseURL: undefined,
proxyHeaders: true, 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, proxy: false,
retry: false, retry: false,
serverTimeout: false, serverTimeout: false,

View File

@ -13,7 +13,7 @@ describe('defaults', () => {
expect(options.clientTimeout).toBe(false) expect(options.clientTimeout).toBe(false)
expect(options.serverTimeout).toBe(false) expect(options.serverTimeout).toBe(false)
expect(options.proxyHeaders).toBe(true) 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.https).toBe(false)
expect(options.retry).toBe(0) expect(options.retry).toBe(0)
}) })