vue设置自定义域名访问并设置为htpps

 

修改vue.config.js

module.exports = {
  configureWebpack: {
    devServer: {
      host: 'www.word.com',
      port: 8080,
      open: true,
      proxy: {
        "/api": {
          target: "https://www.word.com:22599",
        },
      },
      https: true
    },
    devtool: "inline-source-map"
  },
};

主要是:

host: 'www.word.com',
port: 8080,
https: true
posted @ 2021-02-22 10:26  皮军旗  阅读(839)  评论(0)    收藏  举报