What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-04 11:33:06
laravel Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on
Step 1 : Create Cors middleware. php artisan make:middleware Cors Step 2 : Add below lines in handle function before return. //header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Origin: http://localhost:4200'); header('Access-Cont... Add solution