Commit 8da76739ecca7d0ba2ad7e30cb9e0267e07dd0fd

Authored by Adhidarma Hadiwinoto
1 parent d27581f507
Exists in master

config.partner.callback.debug_apikey

Showing 2 changed files with 4 additions and 2 deletions Side-by-side Diff

... ... @@ -13,7 +13,8 @@
13 13 "PLEASE_CHANGE_ME"
14 14 ],
15 15 "trust_proxy": ["loopback"],
16   - "dump_request": true
  16 + "dump_request": true,
  17 + "debug_apikey": false
17 18 }
18 19 },
19 20 "control_panel": {
lib/callback/apikey-checker.js
... ... @@ -3,7 +3,8 @@ const MODULE_NAME = 'CALLBACK.APIKEY-CHECKER';
3 3 const config = require('komodo-sdk/config');
4 4 const logger = require('tektrans-logger');
5 5  
6   -const { DEBUG_CALLBACK_APIKEY } = process.env;
  6 +const DEBUG_CALLBACK_APIKEY = process.env.DEBUG_CALLBACK_APIKEY
  7 + || (config.partner && config.partner.callback && config.partner.callback.debug_apikey);
7 8  
8 9 const sendInvalidApikeyResponse = (xid, res) => {
9 10 res.status(403).json({