vishak vishak - 1 year ago 109
HTTP Question

How to add Access-Control-Expose-Headers in Nginx server?

I have added

add_header 'Access-Control-Expose-Headers' '*';
in my Nginx server. But still not able to get any response headers.

Answer Source

Somewhere in your server or location block. Please note that * will not be acceptable here. You have to explicitly expose each custom header.

add_header 'Access-Control-Expose-Headers' 'Authorization,X-Custom-Header';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download