From 2843a3b6d7cffeea7f1b20772fd28b8374f484d7 Mon Sep 17 00:00:00 2001 From: Matt Basta Date: Sun, 23 Jun 2024 12:35:37 -0400 Subject: [PATCH] Add user agent string to feed requests --- server/utils/podcastUtils.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/utils/podcastUtils.js b/server/utils/podcastUtils.js index 954a6d57..9c8a3f20 100644 --- a/server/utils/podcastUtils.js +++ b/server/utils/podcastUtils.js @@ -233,7 +233,10 @@ module.exports.getPodcastFeed = (feedUrl, excludeEpisodeMetadata = false) => { method: 'GET', timeout: 12000, responseType: 'arraybuffer', - headers: { Accept: 'application/rss+xml, application/xhtml+xml, application/xml, */*;q=0.8' }, + headers: { + Accept: 'application/rss+xml, application/xhtml+xml, application/xml, */*;q=0.8', + 'User-Agent': 'audiobookshelf (+https://github.com/advplyr/audiobookshelf; like iTMS)' + }, httpAgent: global.DisableSsrfRequestFilter ? null : ssrfFilter(feedUrl), httpsAgent: global.DisableSsrfRequestFilter ? null : ssrfFilter(feedUrl) })