Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel api enable cors

//I always use an easy method. Just add below lines to publicindex.php file.
//You don't have to use a middleware I think.

header('Access-Control-Allow-Origin: *');  
header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');
Comment

laravel cors enable

Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
Header always set Access-Control-Max-Age "1000"
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
Comment

laravel api cors localhost issue

composer require fruitcake/laravel-cors
  
Comment

what is cors in laravel

Cross-Origin Resource Sharing
sharing resources between different sources
Comment

PREVIOUS NEXT
Code Example
Php :: max_execution_time php 
Php :: laravel validate file type 
Php :: previous month number in php 
Php :: php create url with query sting from array 
Php :: php number to color 
Php :: optimize clear laravel not working 
Php :: program-generate-random-alphabets using php 
Php :: how to find this day is holiday in php day 
Php :: php json encode 
Php :: woocommerce check if user is logged in 
Php :: laravel request integer 
Php :: laravel with where has 
Php :: time to string in php 
Php :: array_key_exists vs in_array 
Php :: php enter line break 
Php :: how to replace multiple characters in a string in php 
Php :: php run localhost 
Php :: turnery expression php 
Php :: laravel check my laravel version 
Php :: laravel count by date 
Php :: php copy 
Php :: php remove stop words from string 
Php :: laravel create seeder 
Php :: check if a string contains a substring in php 
Php :: random digit with seed php 
Php :: phpspreadsheet read xlsx 
Php :: php isset post 
Php :: how to check using what guard in laravel 8 
Php :: laravel sum relationship column 
Php :: cloudflare country 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =