I am interested to prevent click jacking on my customer's website that is hosted in cPanel.
I have been researching Content-Security-Policy: frame-ancestors 'self' -
As I understand it, this prevents bad actors from copying e.g. a client login site (like a bank) into e.g. an iFrame and redirecting users to a malicious site.
However, I am a bit vague on the best way to implement CSP, especially at the single site level.
This help article seems to suggest you can simply add a line to the .htaccess file - but is it referring to the one in the public_html/ folder or at the server level ?
I want to target this policy to individual sites / or alias / parked domains on a single site.
Wondering if cPanel can offer some tips
Thanks
I have been researching Content-Security-Policy: frame-ancestors 'self' -
As I understand it, this prevents bad actors from copying e.g. a client login site (like a bank) into e.g. an iFrame and redirecting users to a malicious site.
However, I am a bit vague on the best way to implement CSP, especially at the single site level.
This help article seems to suggest you can simply add a line to the .htaccess file - but is it referring to the one in the public_html/ folder or at the server level ?
I want to target this policy to individual sites / or alias / parked domains on a single site.
I also found the OWASP site information quite helpful.Apache Content-Security-Policy Header
Add the following to your httpd.conf in your VirtualHost or in an .htaccess file:
Header set Content-Security-Policy "default-src 'self';"
Wondering if cPanel can offer some tips
Thanks
Last edited by a moderator: