Skip to content

Instantly share code, notes, and snippets.

@trq
Created October 3, 2014 12:28
Show Gist options
  • Save trq/955c81b89e30fe66430d to your computer and use it in GitHub Desktop.
Save trq/955c81b89e30fe66430d to your computer and use it in GitHub Desktop.
<?php
require __DIR__.'/../bootstrap/autoload.php';
$app = require_once __DIR__.'/../bootstrap/start.php';
$app = new Cors($app, array(
// you can use array('*') to allow any headers
'allowedHeaders' => array('x-allowed-header', 'x-other-allowed-header'),
// you can use array('*') to allow any methods
'allowedMethods' => array('DELETE', 'GET', 'POST', 'PUT'),
// you can use array('*') to allow requests from any origin
'allowedOrigins' => array('localhost'),
'exposedHeaders' => false,
'maxAge' => false,
'supportsCredentials' => false,
));
$app = $stack->resolve($app);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment