Update: 2026-06-16 01:17:28
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
require_once __DIR__ . '/core/bootstrap.php';
|
||||
|
||||
header('Content-Type: application/json');
|
||||
header('Access-Control-Allow-Origin: https://intaleqapp.com');
|
||||
header('Access-Control-Allow-Origin: https://siromove.com');
|
||||
header('Access-Control-Allow-Methods: POST, OPTIONS');
|
||||
header('Access-Control-Allow-Headers: Content-Type, Authorization, X-Device-FP');
|
||||
|
||||
@@ -76,7 +76,14 @@ try {
|
||||
'jti' => bin2hex(random_bytes(16)),
|
||||
];
|
||||
|
||||
$secretKey = trim((string)@file_get_contents('/home/siro-api/.secret_key_pay'));
|
||||
$secretKey = '';
|
||||
$payKeyPath = getenv('WALLET_SECRET_KEY_PATH');
|
||||
if ($payKeyPath && file_exists($payKeyPath)) {
|
||||
$secretKey = trim(@file_get_contents($payKeyPath));
|
||||
}
|
||||
if (!$secretKey) {
|
||||
$secretKey = getenv('WALLET_SECRET_KEY') ?: '';
|
||||
}
|
||||
$jwt = Firebase\JWT\JWT::encode($payload, $secretKey, 'HS256');
|
||||
|
||||
$hmac = hash_hmac('sha256', $id, getenv('SECRET_KEY_HMAC'));
|
||||
|
||||
Reference in New Issue
Block a user