Skip to content

Commit

Permalink
fix: request prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
sl1673495 committed Jul 22, 2019
1 parent 55cb450 commit c554603
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/utils/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export let request
export default {
install(Vue) {
request = axios.create({
baseURL: '/api'
baseURL: '/netease-api'
})

request.interceptors.request.use(config => {
Expand Down
4 changes: 2 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module.exports = {
configureWebpack: {
devServer: {
proxy: {
'/api': {
'/netease-api': {
target: 'http://localhost:3000',
pathRewrite: { '^/api': '' },
pathRewrite: { '^/netease-api': '' },
changeOrigin: true,
secure: false
}
Expand Down

0 comments on commit c554603

Please sign in to comment.