Comment

Comment by hcheung

The nginx header directives are all not in correct syntax with the extra ":", and for those directives with multiple values, it should be wrapped within a "" (such as "1; mode=block"), here is the correct settings:

    ## General Security Headers
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Frame-Options deny;
    add_header X-Content-Type-Options nosniff;
    add_header Strict-Transport-Security "max-age=3600; includeSubDomains";
parent hcheung 7 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton