Security Headers

I have followed this guide and it works well: https://cyberpanel.net/docs/how-to-set-hsts-header-strict-transport-security-using-cyberpanel-openlitespeed/

How do we add in additional security headers e.g. X-XSS-Protection 1;mode=block?

Nothing I have tried works.

Hi,

You need add this:

X-XSS-Protection 1;mode=block

to: Header Operations in OLS>Virtual Host>domain>Context>Header Operations

I added all my headers here and get A in securityheaders.com

Regards.

Hi

I tried that before but I put - /home/$VH_NAME/public_html - in Location.
Should that be there or should it be blank?

Also, can you please send me what you use for security headers?

I saved the OLS>Virtual Host>domain>Context leaving Location blank and it crashed my server so I had to restart OLS. I don’t know if it was because I left out the Location or my headers were wrong.

I did everything, it worked. Have you tried it?

can you add the link again on how to get it done please