Fix: /ready всегда 200 — nginx не блокирует трафик. Версия 0.1.16

This commit is contained in:
2026-07-08 22:20:09 +04:00
parent cfdbae0653
commit 158de70e4e
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ipwhitelist",
"version": "0.1.15",
"version": "0.1.16",
"description": "IP WhiteList microservice for cloud provider",
"main": "server.js",
"scripts": {
+2 -2
View File
@@ -78,10 +78,10 @@ async function start() {
app.get('/ready', async (req, res) => {
try {
await pool.query('SELECT 1');
res.send('OK');
} catch (e) {
res.status(503).send('DB not ready');
// БД не отвечает — но приложение открыто, покажет ошибку на страницах
}
res.send('OK');
});
// Если фатальная ошибка конфигурации — показываем на всех страницах сообщение
+1 -1
View File
@@ -8,7 +8,7 @@
// ═══════════════════════════════════════════════════════════════════════════════
module.exports = {
version: '0.1.15',
version: '0.1.16',
// ── Среда ─────────────────────────────────────────────────────────────────
// APP_ENV=test → тестовый стенд (жёлтый баннер в UI, можно включать тестовый API)