From f37fafe30b5f6ff85ebf87fb622293a855877ee1 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Sun, 26 Aug 2018 11:54:25 +0200
Subject: [PATCH] Add health endpoint to streaming API (#8441)

GET /api/v1/streaming/health

Answers with OK. Fix #8337
---
 streaming/index.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/streaming/index.js b/streaming/index.js
index b5f6dbd87..1c6004b77 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -452,6 +452,12 @@ const startWorker = (workerId) => {
   app.use(setRequestId);
   app.use(setRemoteAddress);
   app.use(allowCrossDomain);
+
+  app.get('/api/v1/streaming/health', (req, res) => {
+    res.writeHead(200, { 'Content-Type': 'text/plain' });
+    res.end('OK');
+  });
+
   app.use(authenticationMiddleware);
   app.use(errorMiddleware);