openresty / headers-more-nginx-module

Set, add, and clear arbitrary output headers in NGINX http servers
1.67k stars 222 forks source link

Server response header is not getting cleared #161

Open somnathpawar opened 5 months ago

somnathpawar commented 5 months ago

I want to clear the server information from the Nginx response header "Server". I tried following things: more_set_headers 'Server: my-server'; more_clear_headers 'Server';

But somehow, it is not hiding a Server header and showing nginx/1.14.0 (Ubuntu) as full details on the server. Any idea?

The header works fine for clearing other headers such as "Content-Type" or "Content-encoding" but not working for "Server" header.

Thanks in advance!

kkmuffme commented 2 months ago

Did you try it in the http {} block?