Update: 2026-07-22 18:11:54
This commit is contained in:
@@ -44,9 +44,12 @@ $INTERNAL_KEY = trim(file_get_contents('/home/location/.internal_socket_key'));
|
||||
// });
|
||||
function authenticateJWT()
|
||||
{
|
||||
$secretKey = trim(file_get_contents('/home/location/.secret_key')); // Access secret key (ensure it's set in .env)
|
||||
$secretKeyFile = file_exists(__DIR__ . '/../../loction-keys/.secret_key')
|
||||
? __DIR__ . '/../../loction-keys/.secret_key'
|
||||
: (file_exists('/keys/.secret_key') ? '/keys/.secret_key' : '/home/location/.secret_key');
|
||||
$secretKey = trim((string) @file_get_contents($secretKeyFile)); // Access secret key (ensure it's set in .env)
|
||||
if (!$secretKey) {
|
||||
error_log("SECRET_KEY not set in environment variables.");
|
||||
error_log("SECRET_KEY not set in environment variables. Path checked: $secretKeyFile");
|
||||
http_response_code(500); // Internal Server Error
|
||||
echo json_encode(['error' => 'Internal server configuration error.']);
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user