fix: use getSsrfFilter for NAT64 support in fileUtils.js

Replace ssrfFilter with getSsrfFilter to allow NAT64 addresses
(64:ff9b::/96) which are blocked by the default ssrf-req-filter.

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
This commit is contained in:
Arunesh Dwivedi 2026-06-16 08:29:57 +00:00
parent cb40fef974
commit 023c3591a4

View file

@ -306,8 +306,8 @@ module.exports.downloadFile = (url, filepath, contentTypeFilter = null) => {
'User-Agent': 'audiobookshelf (+https://audiobookshelf.org)'
},
timeout: 30000,
httpAgent: global.DisableSsrfRequestFilter?.(url) ? null : ssrfFilter(url),
httpsAgent: global.DisableSsrfRequestFilter?.(url) ? null : ssrfFilter(url)
httpAgent: global.DisableSsrfRequestFilter?.(url) ? null : getSsrfFilter(url),
httpsAgent: global.DisableSsrfRequestFilter?.(url) ? null : getSsrfFilter(url)
})
.then((response) => {
// Validate content type