Skip to content

Instantly share code, notes, and snippets.

@zacharyblank
Created June 9, 2014 20:28
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 zacharyblank/6f697d2cee3daf565543 to your computer and use it in GitHub Desktop.
Save zacharyblank/6f697d2cee3daf565543 to your computer and use it in GitHub Desktop.
App::before(function($request)
{
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization");
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
exit;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment