如何在角度4中设置授权标头(不在Access-Control-Request-Headers内)。它应该是授权:值。
标题应如下所示
Accept:*/*<br/>
Accept-Encoding:gzip, deflate, sdch<br/>
Accept-Language:en-US,en;q=0.8<br/>
**Authorisation:accesstoken**<br/>
Access-Control-Request-Method:GET<br/>
Cache-Control:max-age=0<br/>
Connection:keep-alive<br/>
Host:192.168.1.190:58603<br/>
Origin:http://localhost:4200<br/>
Referer:http://localhost:4200/analytics<br/>
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.90 Safari/537.36<br/>
<br/>
<br/>
<br/>
但它如下:
Accept:*/*<br/>
Accept-Encoding:gzip, deflate, sdch<br/>
Accept-Language:en-US,en;q=0.8<br/>
**Access-Control-Request-Headers:Authorisation**<br/>
Access-Control-Request-Method:GET<br/>
Cache-Control:max-age=0<br/>
Connection:keep-alive<br/>
Host:192.168.1.190:58603<br/>
Origin:http://localhost:4200<br/>
Referer:http://localhost:4200/analytics<br/>
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.90 Safari/537.36<br/>
<br/>
<br/>
<br/>