PHP Interface Nord\Lumen\Cors\Contracts\CorsService

Mostra file Open project: nordsoftware/lumen-cors Interface Usage Examples

Public Methods

Method Description
handlePreflightRequest ( Request $request ) : Response Handles a preflight request.
handleRequest ( Request $request, Response $response ) : Response Handles the actual request.
isCorsRequest ( Request $request ) : boolean Returns whether or not the request is a CORS request.
isPreflightRequest ( Request $request ) : boolean Returns whether or not the request is a preflight request.

Method Details

handlePreflightRequest() public method

Handles a preflight request.
public handlePreflightRequest ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

handleRequest() public method

Handles the actual request.
public handleRequest ( Request $request, Response $response ) : Response
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
return Symfony\Component\HttpFoundation\Response

isCorsRequest() public method

Returns whether or not the request is a CORS request.
public isCorsRequest ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
return boolean

isPreflightRequest() public method

Returns whether or not the request is a preflight request.
public isPreflightRequest ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
return boolean