Skip to content

Commit

Permalink
fix: lowercase accept-encoding header (#43)
Browse files Browse the repository at this point in the history
+ update docs
  • Loading branch information
atinux authored and Pooya Parsa committed May 21, 2019
1 parent 303168d commit 454807c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/api/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ When directing requests at a url protected by CloudFlare's CDN you should set th

### `proxyHeadersIgnore`

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

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

Expand Down
2 changes: 1 addition & 1 deletion lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default (ctx, inject) => {

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

// Create new HTTP instance
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/pages/ssr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
},
httpEncoding() {
return this.$http._defaults.headers['Accept-Encoding']
return this.$http._defaults.headers['accept-encoding']
}
},
fetch({ app, route }) {
Expand Down

0 comments on commit 454807c

Please sign in to comment.