Skip to content

Commit 454807c

Browse files
Sébastien ChopinPooya Parsa
authored andcommitted
fix: lowercase accept-encoding header (#43)
+ update docs
1 parent 303168d commit 454807c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/api/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ When directing requests at a url protected by CloudFlare's CDN you should set th
126126

127127
### `proxyHeadersIgnore`
128128

129-
* Default `['host', 'accept']`
129+
* Default `['accept', 'host', 'cf-ray', 'cf-connecting-ip']`
130130

131131
Only efficient when `proxyHeaders` is set to true. Removes unwanted request headers to the API backend in SSR.
132132

lib/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default (ctx, inject) => {
108108

109109
if (process.server) {
110110
// Don't accept brotli encoding because Node can't parse it
111-
defaults.headers['Accept-Encoding'] = 'gzip, deflate'
111+
defaults.headers['accept-encoding'] = 'gzip, deflate'
112112
}
113113

114114
// Create new HTTP instance

test/fixture/pages/ssr.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616
},
1717
1818
httpEncoding() {
19-
return this.$http._defaults.headers['Accept-Encoding']
19+
return this.$http._defaults.headers['accept-encoding']
2020
}
2121
},
2222
fetch({ app, route }) {

0 commit comments

Comments
 (0)