Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chernysh2909/4b0ab80453264d811b03db50fd1f8a16 to your computer and use it in GitHub Desktop.
Save chernysh2909/4b0ab80453264d811b03db50fd1f8a16 to your computer and use it in GitHub Desktop.
cors header PHP
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