Looking to hire Laravel developers? Try LaraJobs

laravel-corsmaker maintained by kpod13

Description
This package allows you to return CORS headers in http respnses with Laravel middleware.
Last update
2018/03/15 13:46 (dev-develop)
License
Links
Downloads
24

Comments
comments powered by Disqus

CORSmaker middleware for Laravel 5

See also

About

Features

  • Adds CORS headers to responses
  • Supports multirule configuration

Installation

Install package

composer require kpod13/laravel-corsmaker

Add ServiceProvider into app

Add Kpod13\CorsMaker\ServiceProvider::class into providers in config/app.php. Clear cache php artisan config:cache

Setup middleware as global

protected $middleware = [
    CorsMakerHandler::class
];

Install default config

php artisan vendor:publish --provider="Kpod13\CorsMaker\ServiceProvider"

Configuration

See example in config/corsmaker.php

Testing

Install dependencies

composer install --dev

Run tests

./vendor/bin/phpunit