Permalink
Browse files

fix(axios): don't proxy Host header from request (#72, #39)

  • Loading branch information...
pimlie authored and pi0 committed Jul 19, 2017
1 parent b5e7483 commit 61462cadf7e13596e42d3b8baf558dba1e633c08
Showing with 2 additions and 1 deletion.
  1. +1 −0 modules/axios/package.json
  2. +1 −1 modules/axios/plugin.js
@@ -10,6 +10,7 @@
},
"dependencies": {
"axios": "^0.16.2",
"chalk": "^2.0.1",
"whatwg-url": "^6.1.0"
}
}
@@ -128,7 +128,7 @@ export default (ctx) => {
const axios = Axios.create({
baseURL,
<% if(options.proxyHeaders) { %>headers: (req && req.headers) ? req.headers : {} <% } %>
<% if(options.proxyHeaders) { %>headers: (req && req.headers) ? Object.assign({}, req.headers, {host: ''}) : {} <% } %>
})
<% if(options.credentials) { %>
// Send credentials only to relative and API Backend requests

0 comments on commit 61462ca

Please sign in to comment.