We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdee5cc commit 17b6b92Copy full SHA for 17b6b92
api/health.php
@@ -14,8 +14,12 @@
14
try {
15
$db = get_db();
16
17
- // Optional: validate API key, or skip for public health check
18
- // $api_key = validate_api_key($db);
+ /* 1. Validate API key */
+ $api_key = validate_api_key($db);
19
+
20
+ /* 2. Rate limit */
21
+ $limit = fetch_rate_limit($db, $api_key);
22
+ check_rate_limit($db, $api_key, $limit);
23
24
// Lightweight DB check using fetchOne
25
$result = $db->fetchOne("SELECT 1", [], "");
0 commit comments