Skip to content

Instantly share code, notes, and snippets.

@carl-alberto
Created October 2, 2020 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carl-alberto/189dda188ca1e7934bee3bb8a6431f65 to your computer and use it in GitHub Desktop.
Save carl-alberto/189dda188ca1e7934bee3bb8a6431f65 to your computer and use it in GitHub Desktop.
function additional_securityheaders( $headers ) {
if ( ! is_admin() ) {
$headers['Access-Control-Allow-Origin'] = '*';
}
return $headers;
}
add_filter( 'wp_headers', 'additional_securityheaders' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment