[PR #3692] [MERGED] Remove serverAddress from Feeds and FeedEpisodes URLs #4056

Closed
opened 2026-04-25 00:18:08 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3692
Author: @mikiher
Created: 12/7/2024
Status: Merged
Merged: 12/8/2024
Merged by: @advplyr

Base: masterHead: rss-remove-server-address


📝 Commits (5)

  • 9b8e059 Remove serverAddress from Feeds and FeedEpisodes URLs
  • a8ab8ba always set req.originalHostPrefix
  • b38ce41 Remove xml cache from Feed object
  • 5646466 Update JSDocs for feeds endpoints
  • f7b7b85 Add v2.17.5 migration to changelog

📊 Changes

11 files changed (+359 additions, -65 deletions)

View changed files

📝 client/components/modals/rssfeed/OpenCloseModal.vue (+6 -3)
📝 client/components/modals/rssfeed/ViewFeedModal.vue (+5 -2)
📝 client/pages/config/rss-feeds.vue (+1 -1)
📝 server/Server.js (+11 -8)
📝 server/managers/RssFeedManager.js (+20 -1)
📝 server/migrations/changelog.md (+1 -0)
server/migrations/v2.17.5-remove-host-from-feed-urls.js (+74 -0)
📝 server/objects/Feed.js (+16 -25)
📝 server/objects/FeedEpisode.js (+10 -6)
📝 server/objects/FeedMeta.js (+13 -19)
test/server/migrations/v2.17.5-remove-host-from-feed-urls.test.js (+202 -0)

📄 Description

Brief summary

This fixes #3563, and also makes the necessary preparation for subdirectory support for RSS feeds.

Which issue is fixed?

Fixes #3563

In-depth Description

This removes the protocol and host from all URLs in the Feeds and FeedEpisodes tables (including a migration that changes existing records). The host and protocol are now dynamically determined at runtime based on the request.

The web client is also modified to handle the shortened URLs.

This achieves 2 goals:

  1. It fixes the issues described in #3563
  2. It enables subdirectory support by properly accounting for the subdirectory in generated URLs.

How have you tested this?

The migration (both up and down) has been unit tested and also tested against a real ABS database.

Modifications to server and client were tested with both existing (non-subdirectory) and subdirectory builds. The server and client were accessed through different server addresses and behaved correctly:

  • RSS feed modals displaying the correct URL
  • URLs inside the RSS feed are pointing at the right server, including subdirectory (if exists).
  • Images on the RSS Feeds config page are all displayed correctly

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3692 **Author:** [@mikiher](https://github.com/mikiher) **Created:** 12/7/2024 **Status:** ✅ Merged **Merged:** 12/8/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `rss-remove-server-address` --- ### 📝 Commits (5) - [`9b8e059`](https://github.com/advplyr/audiobookshelf/commit/9b8e059efe68bb21500f2b84de36f54d5750ba97) Remove serverAddress from Feeds and FeedEpisodes URLs - [`a8ab8ba`](https://github.com/advplyr/audiobookshelf/commit/a8ab8badd5c42e1794715a370b6a8ae60c6b8652) always set req.originalHostPrefix - [`b38ce41`](https://github.com/advplyr/audiobookshelf/commit/b38ce4173144a9d33330ac3b59fbf7faf8320292) Remove xml cache from Feed object - [`5646466`](https://github.com/advplyr/audiobookshelf/commit/5646466aa371cc03f12496cd0a1d28de34839734) Update JSDocs for feeds endpoints - [`f7b7b85`](https://github.com/advplyr/audiobookshelf/commit/f7b7b85673fb8a5ac1a9b9c09e1bb686aa7d2f90) Add v2.17.5 migration to changelog ### 📊 Changes **11 files changed** (+359 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `client/components/modals/rssfeed/OpenCloseModal.vue` (+6 -3) 📝 `client/components/modals/rssfeed/ViewFeedModal.vue` (+5 -2) 📝 `client/pages/config/rss-feeds.vue` (+1 -1) 📝 `server/Server.js` (+11 -8) 📝 `server/managers/RssFeedManager.js` (+20 -1) 📝 `server/migrations/changelog.md` (+1 -0) ➕ `server/migrations/v2.17.5-remove-host-from-feed-urls.js` (+74 -0) 📝 `server/objects/Feed.js` (+16 -25) 📝 `server/objects/FeedEpisode.js` (+10 -6) 📝 `server/objects/FeedMeta.js` (+13 -19) ➕ `test/server/migrations/v2.17.5-remove-host-from-feed-urls.test.js` (+202 -0) </details> ### 📄 Description ## Brief summary This fixes #3563, and also makes the necessary preparation for subdirectory support for RSS feeds. ## Which issue is fixed? Fixes #3563 ## In-depth Description This removes the protocol and host from all URLs in the Feeds and FeedEpisodes tables (including a migration that changes existing records). The host and protocol are now dynamically determined at runtime based on the request. The web client is also modified to handle the shortened URLs. This achieves 2 goals: 1. It fixes the issues described in #3563 2. It enables subdirectory support by properly accounting for the subdirectory in generated URLs. ## How have you tested this? The migration (both up and down) has been unit tested and also tested against a real ABS database. Modifications to server and client were tested with both existing (non-subdirectory) and subdirectory builds. The server and client were accessed through different server addresses and behaved correctly: - RSS feed modals displaying the correct URL - URLs inside the RSS feed are pointing at the right server, including subdirectory (if exists). - Images on the RSS Feeds config page are all displayed correctly --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:08 +02:00
adam closed this issue 2026-04-25 00:18:08 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4056