For instance, I can view all the response headers in Chrome, but when I console.log(response)
, I only get 2, content-language
and content-type
.
vs
I understand why this is happening, Access-Control-Expose-Headers
needs to be set server side in order to expose the rest of those headers. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers
However, I'm not understanding, and haven't been able to find any resources online on why and how the browser has access, but my front end javascript client doesn't. What is the technical explanation for how the browser is receiving and accessing the headers, vs a front end client? Is there a way to access the headers the way the browser is via my client?