Skip to content
/ cors Public

Adds CORS (Cross-Origin Resource Sharing) headers support in Coole application. - 在 Coole 应用程序中添加 CORS(跨源资源共享)头支持。

Notifications You must be signed in to change notification settings

coolephp/cors

Repository files navigation

cors

简体中文 | ENGLISH

Adds CORS (Cross-Origin Resource Sharing) headers support in Coole application. - 在 Coole 应用程序中添加 CORS(跨源资源共享)头支持。

Tests Check & fix styling codecov Latest Stable Version Total Downloads License

Requirement

  • PHP >= 7.2

Installation

$ composer require coolephp/cors -vvv

Usage

  1. Copy cors/config/cors.php to coole-skeleton/config/cors.php.
  2. Config \Coole\Cors\Cors::class middleware.
<?php

return [
    /*
     * App 名称
     */
    'name' => env('APP_NAME', 'Coole'),

    /*
     * 全局中间件
     */
    'middleware' => [
        ...
        \Coole\Cors\Cors::class
        ...
    ],
];

Testing

$ composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Adds CORS (Cross-Origin Resource Sharing) headers support in Coole application. - 在 Coole 应用程序中添加 CORS(跨源资源共享)头支持。

Topics

Resources

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages