mirror of https://github.com/sundowndev/http.git
fix: ignore proxy headers `content-md4` and `content-type` (#107)
parent
8ae0cd5655
commit
4152f874a1
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue