forked from platypush/platypush
Fixed devServer routes in vue.config.js.
Use `127.0.0.1` instead of `localhost` for the Vue proxy.
This commit is contained in:
parent
cfedcd701e
commit
79871e0fa1
1 changed files with 9 additions and 15 deletions
|
@ -1,16 +1,14 @@
|
||||||
const httpProxy = {
|
const httpProxy = {
|
||||||
target: 'http://localhost:8008',
|
target: 'http://127.0.0.1:8008',
|
||||||
changeOrigin: true
|
changeOrigin: true
|
||||||
}
|
}
|
||||||
|
|
||||||
const wsProxy = {
|
const wsProxy = {
|
||||||
target: 'http://localhost:8008',
|
target: 'http://127.0.0.1:8008',
|
||||||
changeOrigin: false,
|
changeOrigin: false,
|
||||||
ws: true,
|
ws: true,
|
||||||
onProxyReq: function(request) {
|
onProxyReq: function(request) {
|
||||||
console.log('===== HERE');
|
request.setHeader('Origin', 'http://127.0.0.1:8008');
|
||||||
console.log(request);
|
|
||||||
request.setHeader('Origin', 'http://localhost:8008');
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,16 +29,12 @@ module.exports = {
|
||||||
|
|
||||||
devServer: {
|
devServer: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/execute': httpProxy,
|
'^/ws/events': wsProxy,
|
||||||
'/ws/events': wsProxy,
|
'^/ws/requests': wsProxy,
|
||||||
'/ws/requests': wsProxy,
|
'^/execute': httpProxy,
|
||||||
'/static/*': httpProxy,
|
'^/auth': httpProxy,
|
||||||
'/auth': httpProxy,
|
'^/camera/': httpProxy,
|
||||||
'/login': httpProxy,
|
'^/sound/': httpProxy,
|
||||||
'/logout': httpProxy,
|
|
||||||
'/register': httpProxy,
|
|
||||||
'/camera/*': httpProxy,
|
|
||||||
'/sound/*': httpProxy,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue