Created
May 2, 2020 02:50
-
-
Save JRSalasM/e0b8c744a97047d3214673792e523601 to your computer and use it in GitHub Desktop.
LARAVEL 6 - CORS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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