Thursday, November 5, 2015

Prevent "Click Jacking"

One way to prevent "Click Jacking" is to prevent other sites from displaying your site in a frame.  To accomplish this, simply add this to your web.config:

<system.webServer>
 
...
 
    <httpProtocol>
        <customHeaders>
            <add name="X-Frame-Options" value="DENY" />
        </customHeaders>
    </httpProtocol>
 
...
 
</system.webServer>