From 639d09ae5495c4b386df4ba26b2fa279651f9877 Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <me@adhisimon.org>
Date: Wed, 7 Aug 2019 22:45:45 +0700
Subject: [PATCH] Disable logging on /modems

---
 lib/apiserver/index.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/apiserver/index.js b/lib/apiserver/index.js
index 152edc5..57ae394 100644
--- a/lib/apiserver/index.js
+++ b/lib/apiserver/index.js
@@ -88,7 +88,13 @@ async function pageHistory(req, res) {
 }
 
 app.use(function(req, res, next) {
-    if ( req && req.path && typeof req.path === 'string' && req.path.search(/\/modems\/set$/) >= 0 ) {
+    if ( 
+        req && req.path && typeof req.path === 'string' 
+        && (
+            req.path.search(/\/modems$/) >= 0 
+            || req.path.search(/\/modems\/set$/) >= 0 
+        )
+    ) {
         next();
         return;
     }
-- 
1.9.0