diff --git a/src/CorsService.php b/src/CorsService.php index 73bc9dd..98eb13c 100644 --- a/src/CorsService.php +++ b/src/CorsService.php @@ -19,8 +19,14 @@ public function __construct(array $options = array()) private function normalizeOptions(array $options = array()) { - // Set defaults from the config file - $options += require __DIR__ .'/../config/cors.php'; + $options += array( + 'allowedOrigins' => array(), + 'supportsCredentials' => false, + 'allowedHeaders' => array(), + 'exposedHeaders' => array(), + 'allowedMethods' => array(), + 'maxAge' => 0, + ); // normalize array('*') to true if ($options['allowedOrigins'] === true || in_array('*', $options['allowedOrigins'])) {