Skip to content

Instantly share code, notes, and snippets.

@xinglongjizi
Created April 23, 2024 02:51
Show Gist options
  • Select an option

  • Save xinglongjizi/97c48c776f83ed1d7445366c95ea7ea0 to your computer and use it in GitHub Desktop.

Select an option

Save xinglongjizi/97c48c776f83ed1d7445366c95ea7ea0 to your computer and use it in GitHub Desktop.
'/hiapmrolex/hiapm': {
target: 'https://icanal-beta.starling.huawei.com/',
secure: false,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/hiapmrolex/, ''),
}
/*
secure: true, 默认
"默认情况下,将不接受在 HTTPS 上运行且证书无效的后端服务器"
如果target的地址是https协议,那么请将 secure 配置成 false否则,代理将报500
changeOrigin
详情 https://juejin.cn/post/7151966465606811678
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment