Skip to content

Instantly share code, notes, and snippets.

@alexalannunes
Last active September 19, 2019 03:19
Show Gist options
  • Save alexalannunes/c5872fc0c5fdec9710f95153234f9842 to your computer and use it in GitHub Desktop.
Save alexalannunes/c5872fc0c5fdec9710f95153234f9842 to your computer and use it in GitHub Desktop.
<?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Credentials: true");
header("Access-Control-Allow-Methods: GET,HEAD,OPTIONS,POST,PUT");
header("Access-Control-Allow-Headers: Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers");
// ou
header("Access-Control-Allow-Origin: * ");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment