直入正题,直接在Vue-CLI的vue.config.js文件devServer字段配置:

    // 证书的密码
    pfxPassphrase: 'xxxx', // when develop with https need to provide server certificate to browser.
    // 证书在本项目下的相对路径
    pfx: './x/xx.pfx', // https://github.com/gitpod-io/gitpod/issues/26
    // win10 host文件中 对本机IP映射的域名,例如本机IP 192.168.0.22, host文件对该IP的映射域名为 xxx.com
    public: 'xxx.com' // https://stackoverflow.com/questions/43619644/i-am-getting-an-invalid-host-header-message-when-connecting-to-webpack-dev-ser

相关文章:

  • 2022-12-23
  • 2021-11-24
  • 2021-06-13
  • 2021-12-30
  • 2022-12-23
  • 2021-04-05
  • 2021-11-26
猜你喜欢
  • 2021-12-17
  • 2021-04-08
  • 2021-05-28
  • 2021-07-10
  • 2021-10-09
  • 2021-09-29
  • 2021-10-23
相关资源
相似解决方案