mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Logging api key.
This commit is contained in:
parent
23bec565f6
commit
755eaba268
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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) =>
|
||||
|
|
|
@ -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."
|
||||
}));
|
||||
|
|
Loading…
Add table
Reference in a new issue