Adding more debugging

This commit is contained in:
Chris Troutner
2026-02-04 14:58:20 -07:00
parent 6e32723b29
commit b25f55ce6a
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -49,10 +49,15 @@ export function basicAuthMiddleware (req, res, next) {
const providedToken = parts[1]
// Debug logging
wlogger.verbose(`Basic auth check: providedToken="${providedToken}", configuredToken="${configuredToken}", path="${req.path}"`)
// Compare tokens
if (providedToken === configuredToken) {
req.locals.basicAuthValid = true
wlogger.verbose(`Basic auth validated for request to ${req.path}`)
} else {
wlogger.verbose(`Basic auth failed: token mismatch for request to ${req.path}`)
}
// Always continue to next middleware
+2
View File
@@ -150,6 +150,8 @@ class FulcrumUseCases {
if (bearerToken) {
// Create a temporary bchjs instance with the bearer token from the request
const restURL = process.env.RESTURL || process.env.REST_URL || process.env.LOCAL_RESTURL || config.restURL
console.log('getTransactionsBulk() restURL: ', restURL)
bchjsInstance = new BCHJS({
restURL,
bearerToken