Search
 
SCRIPT & CODE EXAMPLE
 

PHP

header cross origin using php only for our domains and subdomain

$allowedOrigins = [
    "http://www.websiteA.com",
    "https://www.websiteB.com"
    // ... etc
];

if (in_array($_SERVER["HTTP_ORIGIN"], $allowedOrigins)) {
    header("Access-Control-Allow-Origin: " . $_SERVER["HTTP_ORIGIN"]);
}
Comment

PREVIOUS NEXT
Code Example
Php :: create custom domain in localhost xampp 
Php :: how create new command in laravel 
Php :: js change h1 value 
Php :: not required a field when checked not applicable checkbox in laravel 
Php :: update user meta wp code 
Php :: laravel cashier overwrite users table name 
Php :: snap remove php stome 
Php :: moodle webservice create user phone2 
Php :: get youtube thumbnail php 
Php :: carbon laravel use 
Php :: function that checks number only in php 
Php :: php object to xml 
Php :: psicopata narcisista 
Php :: display summernonte data with string limit laravel 
Php :: laravel update from query 
Php :: change php version in ubuntu 
Php :: laravel export make comman 
Php :: how to check the size of mysql database in phpmyadmin 
Php :: php echo arry 
Php :: allow extension image chrome, firefox 
Php :: php get prameter 
Php :: php detect base64 encoding 
Php :: php preg_replace whitespace 
Php :: cascade laravel 
Php :: laravel on delete set null 
Php :: laravel where has 
Php :: Where do php count start 
Php :: array filter use key 
Php :: codeigniter query builder order by 
Php :: php validate only numbers 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =