public function register()
    {
        // Marge the CORS config.
        $this->mergeConfigFrom(__DIR__.'/../../config/lumen.php', 'cors');

        // Register the CORS server instance alias.
        $this->app->alias(CorsInterface::class, Cors::class);

        // Register CORS servise singleton.
        $this->app->singleton(CorsInterface::class, function ($app) {
            // Get CORS config.
            $config = $app['config']->get('cors');

            return new Cors($config);
        });
    }