70 lines
No EOL
2.3 KiB
JavaScript
70 lines
No EOL
2.3 KiB
JavaScript
// vue.config.js
|
|
|
|
module.exports = {
|
|
devServer: {
|
|
headers: {
|
|
"Access-Control-Allow-Origin": "*",
|
|
"Access-Control-Allow-Headers": "*",
|
|
"Access-Control-Allow-Methods": "*"
|
|
},
|
|
//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/,
|
|
},*/
|
|
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',
|
|
},
|
|
}
|
|
}
|
|
} |