From 54d81a6bde31c902edef5d0e0efc0ea8b8db3848 Mon Sep 17 00:00:00 2001 From: briandennis Date: Mon, 12 Mar 2018 12:52:21 -0700 Subject: [PATCH] add secret prefix to logs identifier --- package.json | 3 ++- server.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2b7ca8a..243d5ac 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,8 @@ "TWITTER_CONSUMER_KEY": "@twitter-consumer-key", "TWITTER_CONSUMER_SECRET": "@twitter-consumer-secret", "TWITTER_ACCESS_TOKEN_KEY": "@twitter-access-token-key", - "TWITTER_ACCESS_TOKEN_SECRET": "@twitter-access-token-secret" + "TWITTER_ACCESS_TOKEN_SECRET": "@twitter-access-token-secret", + "LOGS_SECRET_PREFIX": "@logs_secret_prefix" } }, "lint-staged": { diff --git a/server.js b/server.js index 957e9fd..28cc343 100644 --- a/server.js +++ b/server.js @@ -9,7 +9,10 @@ const dev = process.env.NODE_ENV !== 'production' && !process.env.NOW const app = next({ dev }) const handle = app.getRequestHandler() -require('now-logs')(process.env.NOW_URL) +if (!dev) { + const LOGS_ID = `${process.env.LOGS_SECRET_PREFIX}:${process.env.NOW_URL}` + require('now-logs')(LOGS_ID) +} function wrap(handler) { return (req, res) =>