211

Product support

Get help in the plugin support forum.

  • Added on Sep 28, 2024
  • Current version: 1.0.1
  • Platform Compatibility
    v3.x use latest
    v2.x not tested
    v1.x not tested
  • Created by

Categories

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
1.1.1

First version of Cors Pending

Sep 24, 2024