Just another WordPress site

Easily prevent click hijacking

According to Wikipedia, click hijacking is a malicious technique of tricking Web users into revealing confidential information or taking control of their computer while clicking on seemingly innocuous web pages.

To prevent this you can simply add the following to your apache configuration:

Header always append X-Frame-Options SAMEORIGIN

Or in case you want to add it to your PHP application, just use this code:

header("X-Frame-Options: SAMEORIGIN");

For the full documentation just click here.

Leave a comment for: "Easily prevent click hijacking"

You must be logged in to post a comment.