private function cors($request)
  {
    $origin  = $request->server->http_origin;
    $allowed = Config::get('cors.allowedOrigins');

    if (in_array('*', $allowed) || in_array($origin, $allowed) ) {
      $this->withHeaders($request);
    }
  }
private function cors($request)
  {
    $origin  = $request->server->http_origin;
    $allowed = Config::get('cors.allowedOrigins');

    if (in_array('*', $allowed) || in_array($origin, $allowed) ) {
      $this->withHeaders($request);
    }
  }
private function cors ( $ request ) { $ origin = $ request -> server -> http_origin ; $ allowed = Config :: get ( 'cors.allowedOrigins' ) ; if ( in_array ( '*' , $ allowed ) || in_array ( $ origin , $ allowed ) ) { $ this -> withHeaders ( $ request ) ; } }
Handles cors.

@param  \Modulus\Http\Request $requests
@return void
Handles cors .