Skip to content

Instantly share code, notes, and snippets.

@webinfinita
Created October 29, 2014 01:59
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 webinfinita/9d1d682c923deb5fdf61 to your computer and use it in GitHub Desktop.
Save webinfinita/9d1d682c923deb5fdf61 to your computer and use it in GitHub Desktop.
Filters for API's
App::before(function($request)
{
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization, X-Request-With');
header('Access-Control-Allow-Credentials: true');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment