vue配置https
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | const path = require( 'path' ); const fs = require( 'fs' ); const https = require( 'https' ); const options = { key: fs.readFileSync(path.join(__dirname, './ca/client.key' )), cert: fs.readFileSync(path.join(__dirname, './ca/client.crt' )), ca: fs.readFileSync(path.join(__dirname, './ca/ca_cert.pem' )), checkServerIdentity: () => { return null ; }, requestCert: true , }; console.log(options) module.exports = { chainWebpack: (config) => { config.module .rule( 'svg' ) .exclude.add(path.resolve(__dirname, './src/assets/svgIcon' )) .end(); config.module .rule( 'icons' ) .test(/\.svg$/) .include.add(path.resolve(__dirname, './src/assets/svgIcon' )) .end() .use( 'svg-sprite-loader' ) .loader( 'svg-sprite-loader' ) .end(); }, css: { loaderOptions: { sass: { prependData: ` @ import "@computing/opendesign1/themes/plugins/variable.scss" ; @ import "@/styles/variable.scss" ; `, }, }, }, devServer: { port: 8081, proxy: { '/' : { target: 'https://51.38.66.37:30035' , ws: true , changeOrigin: true , agent: new https.Agent(options), logLevel: 'debug' , pathRewrite: { '^/' : '/' , }, }, }, }, }; |
本文来自博客园,作者:易先讯,转载请注明原文链接:https://www.cnblogs.com/gongxianjin/p/17552368.html
分类:
网络安全
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具
2022-07-13 gin-巧用Context传递多种参数