我试图从这样的帖子中获取响应中的位置 Headers :

this.httpClient.post<Response>(url, data, { observe: 'response'}).subscribe(response => {
     const locationHeader = response.headers.get('Location');     
});

但是没有 Headers 可用 . 检查fiddler中的流量验证响应中是否存在 Headers ...为什么Location头不出现在httpclient的headers属性中?

options request

编辑1:在本地为后端api使用azure函数模拟器 . 我的理解是,默认情况下,这应该允许所有标头基于此:Configuring Access-Control-Allow-Headers in Azure Functions

编辑2:带有 Headers 的样本请求中的图像 .