CoolCMS API

CorsTrait

Table of Contents

Properties

$corsConfig  : CorsConfig
$securityConfig  : SecurityConfig

Methods

applyCors()  : void
Applies the CORS headers and short-circuits a preflight (OPTIONS) with a 204 response.

Properties

Methods

applyCors()

Applies the CORS headers and short-circuits a preflight (OPTIONS) with a 204 response.

protected applyCors() : void

IMPORTANT: it must be called in startup() before checkJwtAuth(); a preflight sends no Authorization, so it would otherwise end with 401.

On this page

Search results