From 005d613db10b0b2f40b767fa444eaefc9e766443 Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <me@adhisimon.org>
Date: Tue, 6 Aug 2019 19:48:33 +0700
Subject: [PATCH] jangan log modems/set

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

diff --git a/lib/apiserver/index.js b/lib/apiserver/index.js
index 68e448c..81b9a89 100644
--- a/lib/apiserver/index.js
+++ b/lib/apiserver/index.js
@@ -88,6 +88,11 @@ 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 ) {
+        next();
+        return;
+    }
+    
     logger.verbose('APISERVER: Incoming http request', { ip: req.ip, path: req.path, url: req.url });
     next();
 })
-- 
1.9.0