PioniaCors
in package
implements
CorsContract
Table of Contents
Interfaces
Properties
Methods
- __construct() : mixed
- options() : array<string|int, mixed>
- register() : static
- resolveRequest() : void
- withSettingsNamed() : array<string|int, mixed>|null
- mergeAllowedOrigins() : void
- Merge the allowed origins from the application configuration and let the cors middleware handle the rest
- preventBlockedOrigins() : bool
- prevent all blocked origins from accessing the application
- resolveHttps() : bool
Properties
$application
public
PioniaApplication
$application
$options
public
Arrayable
$options
Methods
__construct()
public
__construct(PioniaApplication $application) : mixed
Parameters
- $application : PioniaApplication
options()
public
options([string|null $corsKey = 'cors' ]) : array<string|int, mixed>
Parameters
- $corsKey : string|null = 'cors'
Return values
array<string|int, mixed>register()
public
register() : static
Return values
staticresolveRequest()
public
resolveRequest(Request $request[, Response|null $response = null ]) : void
Parameters
Tags
withSettingsNamed()
public
withSettingsNamed([string|null $key = 'cors' ]) : array<string|int, mixed>|null
Parameters
- $key : string|null = 'cors'
Return values
array<string|int, mixed>|nullmergeAllowedOrigins()
Merge the allowed origins from the application configuration and let the cors middleware handle the rest
private
mergeAllowedOrigins() : void
preventBlockedOrigins()
prevent all blocked origins from accessing the application
private
preventBlockedOrigins(Request $request, Response|null $response) : bool
Parameters
Return values
boolresolveHttps()
private
resolveHttps(mixed $request, mixed $response) : bool
Parameters
- $request : mixed
- $response : mixed