From 755eaba2685e588f421f2b87dc88f0c39b9f68a3 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Sat, 13 Apr 2019 16:26:53 -0400 Subject: [PATCH] Logging api key. --- config/supervisor_node_text.conf | 2 +- node/original_text.coffee | 2 +- node/original_text.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/supervisor_node_text.conf b/config/supervisor_node_text.conf index 0837e6e54..c672c5111 100644 --- a/config/supervisor_node_text.conf +++ b/config/supervisor_node_text.conf @@ -1,5 +1,5 @@ [program:node_text] -command=node --experimental-modules node/original_text.js +command=node node/original_text.js directory=/srv/newsblur environment=NODE_ENV=production user=sclay diff --git a/node/original_text.coffee b/node/original_text.coffee index 26e0c4fb5..d8b6eedbc 100644 --- a/node/original_text.coffee +++ b/node/original_text.coffee @@ -26,7 +26,7 @@ app.get /\/rss_feeds\/original_text_fetcher\/?/, (req, res) => api_key = req.header 'x-api-key' if not DEV and (!api_key or api_key.indexOf "djtXZrSIEfDa3Dex9FQ9AR" == -1) - log.debug "Mismatched API key: #{url}" + log.debug "Mismatched API key: #{url} / #{api_key}" return res.end JSON.stringify error: "Invalid API key. You need to set up your own Original Text server." Mercury.parse(url).then (result) => diff --git a/node/original_text.js b/node/original_text.js index 3ccb3b260..075ea1c19 100644 --- a/node/original_text.js +++ b/node/original_text.js @@ -39,7 +39,7 @@ } api_key = req.header('x-api-key'); if (!DEV && (!api_key || api_key.indexOf("djtXZrSIEfDa3Dex9FQ9AR" === -1))) { - log.debug("Mismatched API key: " + url); + log.debug("Mismatched API key: " + url + " / " + api_key); return res.end(JSON.stringify({ error: "Invalid API key. You need to set up your own Original Text server." }));