Last active
March 2, 2022 15:31
-
-
Save murshed/c16536d0707d53f0c1d1d6d2af6d7c26 to your computer and use it in GitHub Desktop.
Cross-Origin Resource Sharing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ref https://wordpress.stackexchange.com/questions/342767/allowed-http-origins-only-works-in-theme-functions-php | |
add_action( 'send_headers', 'add_cors_http_header' ); | |
function add_cors_http_header() | |
{ | |
header("Access-Control-Allow-Origin: *"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment