/** * Register the cors function and set defaults * * @param Application $app */ public function register(Container $app) { $app["cors.allowOrigin"] = "*"; // Defaults to all $app["cors.allowMethods"] = null; // Defaults to all $app["cors.maxAge"] = null; $app["cors.allowCredentials"] = null; $app["cors.exposeHeaders"] = null; $app["cors"] = $app->share(function ($app) { return new Cors($app); }); }