mirror of
https://github.com/Permissionless-Software-Foundation/psf-bch-api.git
synced 2026-09-21 16:52:00 -07:00
Refining URL lookup
This commit is contained in:
@@ -49,15 +49,10 @@ 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
|
||||
|
||||
@@ -149,7 +149,7 @@ class FulcrumUseCases {
|
||||
console.log('getTransactionsBulk() bearerToken: ', bearerToken)
|
||||
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
|
||||
const restURL = config.restURL
|
||||
|
||||
console.log('getTransactionsBulk() restURL: ', restURL)
|
||||
bchjsInstance = new BCHJS({
|
||||
|
||||
Reference in New Issue
Block a user