Files
api.stellaamor.com/taca/_conf/globals.php

15 lines
514 B
PHP
Raw Normal View History

2024-12-25 20:02:52 +01:00
<?php
$hostname = $_SERVER['HTTP_HOST'];
if ($hostname === 'api.stellaamor.com') {
// Production environment
header("Access-Control-Allow-Origin: https://taca.stellaamor.com");
} else {
// Local environment
header("Access-Control-Allow-Origin: http://admin.stellaamor.com.local");
}
header("Access-Control-Allow-Credentials: true");
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");
?>