Feature: Add api proxy for vue-js

This commit is contained in:
winkidney
2019-11-22 17:22:40 +08:00
committed by Isaac Bythewood
parent 05fc620642
commit cf7914e593

14
pinry-spa/vue.config.js Normal file
View File

@@ -0,0 +1,14 @@
module.exports = {
devServer: {
proxy: {
'/api': {
target: 'http://localhost:8000/',
changeOrigin: true,
ws: true,
pathRewrite: {
'^/api': '',
},
},
},
},
};