更新时间:2023-02-16 21:36:24
我使用nodejs代理来解决此问题.Nodejs可以轻松处理它.您必须从angular向Node.js发送请求.并从nodejs到restapi.
I used nodejs proxy to solve this question. Nodejs handled it easily. You must send request to nodejs from angular. And to restapi from nodejs.
Angular 8-httpClient的Get方法转换为Options方法
Angular 8 - httpClient Get 方法转换为 Options 方法
Angular访问WebApi出现options方法
使用 OPTIONS 方法未随 http 请求 angular 6 发送授权标头