mirror of
https://github.com/Permissionless-Software-Foundation/psf-bch-api.git
synced 2026-09-21 16:52:00 -07:00
Adding more debugging
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user