quioteframework / cors
CORS middleware (preflight handling + response headers) for Quiote.
v3.1.0
2026-07-29 21:28 UTC
Requires
- php: >=8.5.0
- quioteframework/quiote: *
README
CORS (Cross-Origin Resource Sharing) middleware for Quiote.
Install
composer require quioteframework/cors
Enable
Set cors.enabled to true in your app's settings, plus cors.allowed_origins
(a list of origins, or ["*"]). All other keys have sane defaults:
cors.allowed_origins— list of allowed origins, or["*"](default:[], i.e. nothing allowed)cors.allowed_methods— defaultGET, POST, PUT, PATCH, DELETE, OPTIONScors.allowed_headers— default: echoes the preflight'sAccess-Control-Request-Headerscors.exposed_headers— default: nonecors.allow_credentials— defaultfalsecors.max_age— preflight cache duration in seconds, default0(no caching)
Requests without an Origin header pass through untouched. Preflight
(OPTIONS with Access-Control-Request-Method) requests are answered
directly with a 204 and never reach the action.
License
MIT. See LICENSE.