c3lf-system-3/web/vue.config.js

70 lines
2.3 KiB
JavaScript
Raw Normal View History

2024-06-18 18:10:10 +00:00
// vue.config.js
module.exports = {
devServer: {
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*"
},
2024-01-22 18:20:27 +00:00
//devMiddleware: {
// //location /redirect_media/ {
// // internal;
// // alias /var/www/c3lf-sys3/userfiles/;
// //}
// //
// //location /redirect_thumbnail/ {
// // internal;
// // alias /var/www/c3lf-sys3/userfiles/thumbnails/;
// //}
// modifyResponse: function (res) {
// path = res.headers['x-accel-redirect'];
// let re_path;
// if (path && path.includes('/redirect_thumbnail/')) {
// re_path = path.replace('/redirect_thumbnail/', '../userfiles/thumbnails/');
// }else if (path && path.includes('/redirect_media/')) {
// re_path = path.replace('/redirect_media/', '../userfiles/');
// }
// const body = require(re_path);
// res.headers['content-type'] = 'image/jpeg';
// res.headers['content-length'] = body.length;
// res.body = body;
// return res;
// },
//},
/*setupMiddlewares: (middlewares, devServer) => {
devServer.app.use(basicAuth({
users: {
'c3lf': 'findetalles'
},
challenge: true
}));
return middlewares;
},*/
/*watchOptions: {
poll: true,
ignored: /node_modules/,
},*/
2024-06-18 18:10:10 +00:00
proxy: {
'^/media/2': {
target: 'https://staging.c3lf.de/',
changeOrigin: true
},
'^/api/2': {
target: 'https://staging.c3lf.de/',
changeOrigin: true,
},
'^/api/1': {
target: 'https://staging.c3lf.de/',
changeOrigin: true,
},
'^/ws/2': {
target: 'http://127.0.0.1:8082/',
//changeOrigin: true,
ws: true,
logLevel: 'debug',
},
}
}
}