- modules: [
- '@nuxtjs/axios',
- ],
- axios: {
- //prefix: '/api/',
- proxy: true // Can be also an object with default options
- },
- proxy: {
- '/api': {
- target: 'http://10.46.50.143:3000',
- pathRewrite: {'^/api' : ''},
- changeOrigin: true,
- secure: false
- }
- },
来源: http://www.bubuko.com/infodetail-2868702.html