CorsTrait
Table of Contents
Properties
Methods
- applyCors() : void
- Applies the CORS headers and short-circuits a preflight (OPTIONS) with a 204 response.
Properties
$corsConfig
public
CorsConfig
$corsConfig
Attributes
- #[Inject]
$securityConfig
public
SecurityConfig
$securityConfig
Attributes
- #[Inject]
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.