Harden Project 01 public endpoints
This commit is contained in:
+3
-5
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user