vue.config.js 472 B

1234567891011121314151617181920212223
  1. const path = require('path')
  2. const fs = require('fs')
  3. module.exports = {
  4. devServer: {
  5. proxy: {
  6. '/api': {
  7. target: 'http://127.0.0.1:8888',
  8. changeOrigin: true,
  9. ws: false,
  10. pathRewrite: {
  11. '^/api': ''
  12. }
  13. }
  14. },
  15. // 音视频功能需要ssl证书,如需调试请打开注释
  16. // https: {
  17. // cert: fs.readFileSync(path.join(__dirname, 'src/ssl/cert.crt')),
  18. // key: fs.readFileSync(path.join(__dirname, 'src/ssl/cert.key'))
  19. // }
  20. }
  21. }