original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Set access control origins.
docstring_tokens: Set access control origins .