kb: how-to
Plesk for Linux
ABT: Group A
Applicable to:
- Plesk for Linux
Question
How to add headers to sw-engine delivered pages?
For instance:
CONFIG_TEXT: X-XSS-Protection
X-Content-Type-Options
Strict-Transport-Security
Answer
-
Connect to the server via SSH;
-
Modify
/etc/sw-cp-server/conf.d/plesk.conf
using any text editor (for example vi) and add required values to the server section:CONFIG_TEXT: # XSS Protection
add_header X-XSS-Protection 1;
add_header X-Content-Type-Options "nosniff";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;Note: These values are just an example. Syntax of the headers may be obtained from the nginx manual.
-
Restart
sw-cp-server
process:# service sw-cp-server reload
Comments
0 comments
Please sign in to leave a comment.