Pionia Core

PioniaCors
in package
implements CorsContract

Table of Contents

Interfaces

CorsContract

Properties

$application  : PioniaApplication
$options  : Arrayable

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

Methods

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
static

resolveRequest()

public resolveRequest(Request $request[, Response|null $response = null ]) : void
Parameters
$request : Request
$response : Response|null = null
Tags
throws
NotFoundExceptionInterface
throws
NotFoundException
throws
ContainerExceptionInterface
throws
DependencyException

withSettingsNamed()

public withSettingsNamed([string|null $key = 'cors' ]) : array<string|int, mixed>|null
Parameters
$key : string|null = 'cors'
Return values
array<string|int, mixed>|null

mergeAllowedOrigins()

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
$request : Request
$response : Response|null
Return values
bool

resolveHttps()

private resolveHttps(mixed $request, mixed $response) : bool
Parameters
$request : mixed
$response : mixed
Return values
bool

        
On this page

Search results