Skip to content
Back to Blog

· 1 min read

Prevent clickjacking on Drupal and other Apache web applications

Updating Apache server configuration to use mod_headers to prevent clickjacking security issues

Cover artwork for Prevent clickjacking on Drupal and other Apache web applications

Security is an important aspect to keep an eye for, and this time it’s about preventing clickjacking on Drupal and other Apache web applications.

Edit apache’s configuration file, which may be your declared vhost or such, usually at a location like /etc/httpd/conf.d/default.conf and make sure the following

<IfModule mod_headers.c>
Header always append X-Frame-Options SAMEORIGIN
</IfModule>

This will disable embedding your website as an iFrame.