如果SAP ERP的HTTPS是自签名证书,或者是开发系统证书过期了,通过导入证书等方式,还是比较麻烦,不然索性用http协议访问,方法是本地电脑安装个nginx 服务器,比如下面的配置,启动nginx,然后VSCode或者WebIDE就可以走http://localhost:9000/xxx 访问Fiori和OData了
server {
listen 9000;
# server_name somename alias another.alias;
location / {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
proxy_set_header Host localhost:9000;
proxy_pass https://106.xxx.xxx.xxx:44300/;
}
}