Express or react is removing headers

前端 未结 1 764
难免孤独
难免孤独 2021-01-29 09:32

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(\'/         


        
相关标签:
1条回答
  • 2021-01-29 09:54

    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

    0 讨论(0)
提交回复
热议问题