Unable to read custom http headers in javascript onreadystatechange?

后端 未结 2 862
南方客
南方客 2021-01-14 20:18

While i am trying to read custom http headers.i am hetting null.

Jersey authentication resource :-

   @Path(\"/redirect\")
   public class RedirectDe         


        
2条回答
  •  醉梦人生
    2021-01-14 20:31

    If someone still looking for the answer, you need to set "Access-Control-Expose-Headers" along side with the response. In example :

    Access-Control-Expose-Headers: Content-Type,Authorization,X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset
    

提交回复
热议问题