Update: 2026-06-16 01:17:28
This commit is contained in:
@@ -9,7 +9,19 @@ loadEnvironment($env_file);
|
||||
$secretKey = getenv('SECRET_KEY'); // Only need the secret key now
|
||||
|
||||
// --- CORS Headers ---
|
||||
header("Access-Control-Allow-Origin: *"); // Replace * with your Flutter app's origin!
|
||||
$allowedOrigins = [
|
||||
'https://walletintaleq.intaleq.xyz',
|
||||
'https://wallet.siromove.com',
|
||||
'https://wallet-syria.siromove.com',
|
||||
'https://wallet-egypt.siromove.com',
|
||||
'https://wallet-jordan.siromove.com',
|
||||
];
|
||||
$origin = $_SERVER['HTTP_ORIGIN'] ?? '';
|
||||
if (in_array($origin, $allowedOrigins)) {
|
||||
header("Access-Control-Allow-Origin: $origin");
|
||||
} else {
|
||||
header("Access-Control-Allow-Origin: https://walletintaleq.intaleq.xyz");
|
||||
}
|
||||
header("Access-Control-Allow-Methods: GET, POST, OPTIONS"); // Adjust as needed
|
||||
header("Access-Control-Allow-Headers: Content-Type, Authorization");
|
||||
header('Content-Type: application/json'); // Set content type to JSON
|
||||
|
||||
Reference in New Issue
Block a user