fix #1959 strip trailing slashes from url (#1973)

This commit is contained in:
Scroogey-SN 2025-03-17 18:16:31 +00:00 committed by GitHub
parent c492618d31
commit a3762f70b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ export async function createInvoice (
out: false
})
let hostname = url.replace(/^https?:\/\//, '')
let hostname = url.replace(/^https?:\/\//, '').replace(/\/+$/, '')
const agent = getAgent({ hostname })
if (process.env.NODE_ENV !== 'production' && hostname.startsWith('localhost:')) {