CodeIgniter v4.5 API

Cors
in package
implements FilterInterface

Tags
see
CorsTest

Table of Contents

Interfaces

FilterInterface
Filter interface

Properties

$cors  : Cors|null

Methods

__construct()  : mixed
after()  : ResponseInterface|void
Allows After filters to inspect and modify the response object as needed. This method does not allow any way to stop execution of other after filters, short of throwing an Exception or Error.
before()  : ResponseInterface|string|void
Do whatever processing this filter needs to do.
createCorsService()  : void

Properties

Methods

__construct()

public __construct([array{allowedOrigins?: list, allowedOriginsPatterns?: list, supportsCredentials?: bool, allowedHeaders?: list, exposedHeaders?: list, allowedMethods?: list, maxAge?: int} $config = [] ]) : mixed
Parameters
$config : array{allowedOrigins?: list, allowedOriginsPatterns?: list, supportsCredentials?: bool, allowedHeaders?: list, exposedHeaders?: list, allowedMethods?: list, maxAge?: int} = []
Tags
testTag

$config is used for testing purposes only.

after()

Allows After filters to inspect and modify the response object as needed. This method does not allow any way to stop execution of other after filters, short of throwing an Exception or Error.

public after(RequestInterface $request, ResponseInterface $response[, array<int, string>|null $arguments = null ]) : ResponseInterface|void
Parameters
$request : RequestInterface
$response : ResponseInterface
$arguments : array<int, string>|null = null
Return values
ResponseInterface|void

createCorsService()

private createCorsService(array<int, string>|null $arguments) : void
Parameters
$arguments : array<int, string>|null

        
On this page

Search results