Skip to content

Commit

Permalink
#842 Adding security headers
Browse files Browse the repository at this point in the history
Signed-off-by: James Hunt <[email protected]>
  • Loading branch information
thetwopct authored and cjyabraham committed Nov 29, 2024
1 parent de6e3be commit e0b9ea7
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ function ( $headers ) {

// remove application passwords.
add_filter( 'wp_is_application_passwords_available', '__return_false' );

// Add strict-origin-when-cross-origin referrer policy.
add_action( 'wp_head', 'wp_strict_cross_origin_referrer' );

// Add X-Frame-Options SAMEORIGIN.
add_action( 'send_headers', 'send_frame_options_header', 10, 0 );
}

/**
Expand Down Expand Up @@ -340,7 +346,7 @@ public function add_header_cache() {
* or ignore certain other authors.
*
* @param string $display_name Display name.
*
*
*/
public function rss_author_prep( $display_name ) {
if ( is_feed() ) {
Expand All @@ -358,7 +364,7 @@ public function rss_author_prep( $display_name ) {
return $display_name;
}
}

return $display_name;
}
}

0 comments on commit e0b9ea7

Please sign in to comment.