Prevent other sites from showing my site via iframe
WordPress has a built-in function to send the X-Frame-Options header: send_frame_options_header(). It is used by default on the login and admin pages. If you want to enable it always, just add it for front end views: add_action( ‘template_redirect’, ‘send_frame_options_header’ ); But … it doesn’t send Content-Security-Policy headers. If you want to have a more complete … Read more