about summary refs log tree commit diff
path: root/streaming
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-08-26 11:54:25 +0200
committerGitHub <noreply@github.com>2018-08-26 11:54:25 +0200
commitf37fafe30b5f6ff85ebf87fb622293a855877ee1 (patch)
tree3ab1969d8bfd6b704d826876af51cce8bb8246f3 /streaming
parent5c42e8b51bec4bed32326989037fd519ba58dbe6 (diff)
Add health endpoint to streaming API (#8441)
GET /api/v1/streaming/health

Answers with OK. Fix #8337
Diffstat (limited to 'streaming')
-rw-r--r--streaming/index.js6
1 files changed, 6 insertions, 0 deletions
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);