private function origins()
    {
        if(array_has($_SERVER, 'HTTP_ORIGIN')){
            foreach (config('cors.origins') as $origin) {
                if ($_SERVER['HTTP_ORIGIN'] == $origin) {
                    header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
                    break;
                }
            }

            if(config('cors.origins') == ['*']){
                header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
            }
        }


        if(!array_has($_SERVER, 'HTTP_ORIGIN') &&
            env('APP_ENV') != 'local' &&
            config('cors.local') != 'true' &&
            config('cors.internal') == false){

            abort(403);
        }
    }
private function origins()
    {
        if(array_has($_SERVER, 'HTTP_ORIGIN')){
            foreach (config('cors.origins') as $origin) {
                if ($_SERVER['HTTP_ORIGIN'] == $origin) {
                    header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
                    break;
                }
            }

            if(config('cors.origins') == ['*']){
                header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
            }
        }


        if(!array_has($_SERVER, 'HTTP_ORIGIN') &&
            env('APP_ENV') != 'local' &&
            config('cors.local') != 'true' &&
            config('cors.internal') == false){

            abort(403);
        }
    }
private function origins ( ) { if ( array_has ( $ _SERVER , 'HTTP_ORIGIN' ) ) { foreach ( config ( 'cors.origins' ) as $ origin ) { if ( $ _SERVER [ 'HTTP_ORIGIN' ] == $ origin ) { header ( 'Access-Control-Allow-Origin: ' . $ _SERVER [ 'HTTP_ORIGIN' ] ) ; break ; } } if ( config ( 'cors.origins' ) == [ '*' ] ) { header ( 'Access-Control-Allow-Origin: ' . $ _SERVER [ 'HTTP_ORIGIN' ] ) ; } } if ( ! array_has ( $ _SERVER , 'HTTP_ORIGIN' ) && env ( 'APP_ENV' ) != 'local' && config ( 'cors.local' ) != 'true' && config ( 'cors.internal' ) == false ) { abort ( 403 ) ; } }
Set access control origins.
Set access control origins .