Harden Project 01 public endpoints

This commit is contained in:
Andrie
2026-06-11 23:15:42 +07:00
parent a90748d9c1
commit 6f4488c1b8
39 changed files with 1183 additions and 612 deletions
+3 -5
View File
@@ -6,7 +6,6 @@
*/
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');
header('Expires: 0');
@@ -20,9 +19,8 @@ $result = $conn->query(
);
if (!$result) {
http_response_code(500);
echo json_encode(['status' => 'error', 'message' => 'Query gagal: ' . $conn->error]);
exit;
error_log('Project 01 legacy point read failed: ' . $conn->error);
json_error('Gagal memuat data.', 500);
}
$data = [];
@@ -43,4 +41,4 @@ echo json_encode([
'data' => $data
]);
$conn->close();
$conn->close();