Welcome! Log In Create A New Profile

Advanced

add_headers on text/html only?

Nick Semenkovich
July 18, 2012 12:26AM
I'm trying to add three headers for security to all text/html content:

add_header X-Content-Type-Options 'nosniff';
add_header X-Frame-Options 'DENY';
add_header X-XSS-Protection '1; mode=block';

I'd like to add these to a number of different sites & virtual hosts in nginx.

Q: Is there an easy way to add this to multiple different hosts
without updating every server{} block?

Can I put this into an http{} section in some way (but still limit it
to text/html)?


Best,
Nick
--
Nick Semenkovich

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

add_headers on text/html only?

Nick Semenkovich July 18, 2012 12:26AM

Re: add_headers on text/html only?

Sergey Budnevitch July 19, 2012 11:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 181
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready