I have followed this guide and it works well: How To Set HSTS Header (Strict-Transport-Security) Using CyberPanel (OpenLiteSpeed) - CyberPanel
How do we add in additional security headers e.g. X-XSS-Protection 1;mode=block?
Nothing I have tried works.
You need add this:
to: Header Operations in OLS>Virtual Host>domain>Context>Header Operations
I added all my headers here and get A in securityheaders.com
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?