<?php

    return [

        /*
         |--------------------------------------------------------------------------
         | Laravel CORS Defaults
         |--------------------------------------------------------------------------
         |
         | The defaults are the default values applied to all the paths that match,
         | unless overridden in a specific URL configuration.
         | If you want them to apply to everything, you must define a path with *.
         |
         | allowedOrigins, allowedHeaders and allowedMethods can be set to array('*')
         | to accept any value, the allowed methods however have to be explicitly listed.
         |
         */
        'defaults' => [
            'supportsCredentials' => FALSE,
            'allowedOrigins'      => ['*'], // Change when going to live.
            'allowedHeaders'      => ['*'],
            'allowedMethods'      => ['GET', 'POST', 'OPTIONS'],
            'exposedHeaders'      => [],
            'maxAge'              => 0,
            'hosts'               => [],
        ],

        'paths' => [
            'api/*' => [
                'allowedOrigins' => ['*'],
                'allowedHeaders' => ['*'],
                'allowedMethods' => ['GET', 'POST', 'OPTIONS'],
                'maxAge'         => 3600,
            ],
            '*'     => [
                'allowedOrigins' => ['*'],
                'allowedHeaders' => ['*'],
                'allowedMethods' => ['GET', 'POST', 'OPTIONS'],
                'maxAge'         => 3600,
                'hosts'          => ['api.*'],
            ],
        ],

    ];
