Skip to content

Instantly share code, notes, and snippets.

@JRSalasM
Created May 2, 2020 02:50
Show Gist options
  • Save JRSalasM/e0b8c744a97047d3214673792e523601 to your computer and use it in GitHub Desktop.
Save JRSalasM/e0b8c744a97047d3214673792e523601 to your computer and use it in GitHub Desktop.
LARAVEL 6 - CORS
//Instalamos
composer require fruitcake/laravel-cors
//Agregamos esta linea al archivo app/Http/Kernel.php
//en "protected $middleware"
\Fruitcake\Cors\HandleCors::class,
//Creamos arvhivo de conficuración
php artisan vendor:publish --tag="cors"
//Abrimos el archivo de configuracion config/cors.php y agregamos el Path que queremos darle acceso de origenes
'paths' => ['api/*'],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment