Created
August 1, 2023 09:43
-
-
Save chernysh2909/4b0ab80453264d811b03db50fd1f8a16 to your computer and use it in GitHub Desktop.
cors header PHP
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
header("Access-Control-Allow-Origin: *"); //add this CORS header to enable any domain to send HTTP requests to these endpoints: | |
header("Access-Control-Allow-Methods: GET, POST"); | |
header("Access-Control-Allow-Headers: Content-Type"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment