From a2d25266fbab80f60bc893eb6836be54a4803dd8 Mon Sep 17 00:00:00 2001 From: Purple Date: Sat, 17 Jan 2026 23:30:03 +0000 Subject: [PATCH] fix width --- webapp/api.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/webapp/api.php b/webapp/api.php index a3f861a..9bdfd36 100644 --- a/webapp/api.php +++ b/webapp/api.php @@ -2247,16 +2247,7 @@ function handleAwsSettingsSave($db) { * Test AWS connection */ function handleAwsTest($db) { - if ($_SERVER['REQUEST_METHOD'] !== 'POST') { - jsonResponse(['error' => 'Method not allowed'], 405); - } - - $input = json_decode(file_get_contents('php://input'), true); - - if (!validateCSRFToken($input['csrf_token'] ?? '')) { - jsonResponse(['error' => 'Invalid CSRF token'], 403); - } - + // Allow both GET and POST for testing connection $accessKeyId = getSetting($db, 'aws_access_key_id', ''); $secretAccessKey = getSetting($db, 'aws_secret_access_key', ''); $region = getSetting($db, 'aws_region', 'us-east-1'); @@ -2280,6 +2271,7 @@ function handleAwsTest($db) { jsonResponse([ 'success' => true, + 'zones_count' => $zoneCount, 'message' => "Connection successful! Found {$zoneCount} hosted zone(s)." ]); } catch (Exception $e) {