Merge pull request #158 from Permissionless-Software-Foundation/ct-unstable

fix(debug): Removing debugging statements
This commit is contained in:
Chris Troutner
2021-08-07 12:45:43 -07:00
committed by GitHub
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -12,7 +12,7 @@
// req.locals.jwtToken property. // req.locals.jwtToken property.
const getTokenFromHeaders = (req, res, next) => { const getTokenFromHeaders = (req, res, next) => {
try { try {
console.log('req.headers: ', req.headers) // console.log('req.headers: ', req.headers)
// Only executes if the authorization header exists. // Only executes if the authorization header exists.
if (req.headers.authorization) { if (req.headers.authorization) {
@@ -23,7 +23,7 @@ const getTokenFromHeaders = (req, res, next) => {
if (authStr.split(' ')[0] === 'Token') { if (authStr.split(' ')[0] === 'Token') {
const token = authStr.split(' ')[1] const token = authStr.split(' ')[1]
console.log(`JWT found: ${token}`) // console.log(`JWT found: ${token}`)
// Create the req.locals property if it does not yet exist. // Create the req.locals property if it does not yet exist.
if (!req.locals) { if (!req.locals) {
+3 -3
View File
@@ -270,9 +270,9 @@ class RateLimits {
res.locals.rateLimitTriggered = true res.locals.rateLimitTriggered = true
// console.log('res.locals: ', res.locals) // console.log('res.locals: ', res.locals)
console.log( // console.log(
`rate limit debug info: ${JSON.stringify(debugInfo, null, 2)}` // `rate limit debug info: ${JSON.stringify(debugInfo, null, 2)}`
) // )
// Rate limited was triggered // Rate limited was triggered
res.status(429) // https://github.com/Bitcoin-com/rest.bitcoin.com/issues/330 res.status(429) // https://github.com/Bitcoin-com/rest.bitcoin.com/issues/330