优化跨域配置,支持同域的前后端分离部署

This commit is contained in:
648540858
2023-03-05 09:53:26 +08:00
parent a5d9afeb60
commit a7c3cf5316
71 changed files with 173 additions and 191 deletions

View File

@@ -8,18 +8,18 @@ module.exports = {
dev: {
// Paths
assetsSubDirectory: './static',
assetsPublicPath: './',
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/debug': {
target: 'http://localhost:38080',
target: 'http://localhost:18080',
changeOrigin: true,
pathRewrite: {
'^/debug': '/'
}
},
'/static/snap': {
target: 'http://localhost:38080',
target: 'http://localhost:18080',
changeOrigin: true,
// pathRewrite: {
// '^/static/snap': '/static/snap'
@@ -61,7 +61,7 @@ module.exports = {
// Paths
assetsRoot: path.resolve(__dirname, '../../src/main/resources/static/'),
assetsSubDirectory: './static',
assetsPublicPath: './',
assetsPublicPath: '/',
/**
* Source Maps