mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 09:51:37 +00:00
fix: use global.getSsrfFilter in fileUtils.js
The getSsrfFilter function is set on global in Server.js, so other modules must access it via global.getSsrfFilter(). Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
This commit is contained in:
parent
41b25855bf
commit
32955b897e
1 changed files with 2 additions and 2 deletions
|
|
@ -305,8 +305,8 @@ module.exports.downloadFile = (url, filepath, contentTypeFilter = null) => {
|
|||
'User-Agent': 'audiobookshelf (+https://audiobookshelf.org)'
|
||||
},
|
||||
timeout: 30000,
|
||||
httpAgent: global.DisableSsrfRequestFilter?.(url) ? null : getSsrfFilter(url),
|
||||
httpsAgent: global.DisableSsrfRequestFilter?.(url) ? null : getSsrfFilter(url)
|
||||
httpAgent: global.DisableSsrfRequestFilter?.(url) ? null : global.getSsrfFilter(url),
|
||||
httpsAgent: global.DisableSsrfRequestFilter?.(url) ? null : global.getSsrfFilter(url)
|
||||
})
|
||||
.then((response) => {
|
||||
// Validate content type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue