October CMS Cross Origin Resource Sharing
Simple October CMS Cross Origin Resource Sharing plugin that allows you to configure your Access-Control-Allow headers. The plugin is configured through code and does not clutter the administration area with it's own navigation panel.
October CMS Cross Origin Resource Sharing
1. Check config and configure
<?php return [ 'enabled' => env('CORS_ENABLED', false), 'origin' => env('CORS_ORIGIN', '*'), 'headers' => 'Authorization, Content-Type', 'methods' => 'GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH' ];
2. Configure project enviroment
# CORS CORS_ENABLED=true CORS_ORIGIN=https://example.com,http://localhost
3. Use middleware globally (Kernel.php) or on specific routes
\Tober\Cors\Http\Middleware\CorsMiddleware::class
-
This plugin has not been reviewed yet.
-
1.1.1 |
First version of Cors Pending Sep 24, 2024 |
---|