Add the following to your composer.json file
{
"require": {
"cyber-duck/silverstripe-x-framer": "1.0.*"
}
}
Run composer and then visit /dev/build?flush=all to rebuild the database and flush the cache.
Add any IPs your wish to exclude from X-Frame headers to the YML config array
Xframer:
ips:
- 000.000.000.000
- 000.000.000.001
Call the Xframer init method on your Page Controller or similar
class Page_Controller extends ContentController
{
public function init()
{
parent::init();
Xframer::init();
}
}