创建proxy配置文件proxy.conf.json
内容如下 
{
 
"/api/*": {
"target": "https://abc.com",
"changeOrigin": true,
"secure": false
}
}
 
然后在npm的package.json启动的参数--proxy-config中加入
"start": "ng serve --host 0.0.0.0 --port 4300 --proxy-config proxy.conf.json",

相关文章:

  • 2021-05-29
  • 2021-09-22
  • 2021-11-22
  • 2022-12-23
  • 2021-06-07
  • 2022-01-02
  • 2021-05-19
  • 2021-12-26
猜你喜欢
  • 2021-11-08
  • 2021-07-10
  • 2021-08-03
  • 2022-01-07
  • 2021-05-24
  • 2021-05-31
相关资源
相似解决方案