Last active
September 25, 2016 15:03
-
-
Save teerasej/683218e2b3f4135c45166e9669249185 to your computer and use it in GitHub Desktop.
Enable CorsSlim in Slim Framework 3 Web API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$corsOptions = array( | |
"origin" => "*", | |
"exposeHeaders" => array("Content-Type", "X-Requested-With", "X-authentication", "X-client"), | |
"allowMethods" => array('GET', 'POST', 'PUT', 'DELETE', 'OPTIONS') | |
); | |
$cors = new \CorsSlim\CorsSlim($corsOptions); | |
$app->add($cors); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment