How to read response headers in angularjs?

前端 未结 7 1386
终归单人心
终归单人心 2020-11-27 17:17

My server returns this kind of header: Content-Range:0-10/0:

\"enter

7条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 17:36

    According the MDN custom headers are not exposed by default. The server admin need to expose them using "Access-Control-Expose-Headers" in the same fashion they deal with "access-control-allow-origin"

    See this MDN link for confirmation [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers]

提交回复
热议问题