I have a simple react and express setup. I\'m adding headers to a response but not all of them are available in the react app.
In Express...
app.post(\'/
The
Access-Control-Expose-Headers
response header indicates which headers can be exposed as part of the response by listing their names.By default, only the 6 simple response headers are exposed:
- Cache-Control
- Content-Language
- Content-Type
- Expires
- Last-Modified
- Pragma
If you want clients to be able to access other headers, you have to list them using the
Access-Control-Expose-Headers
header.
Access-Control-Expose-Headers