gearheads
/
mastodon
Archived
2
0
Fork 0

Fix streaming API redirection ignoring the port of `streaming_api_base_url` (#28558)

gh/dev^2
Claire 2024-01-02 13:27:51 +01:00
parent c609b726cb
commit 01caa18e5b
1 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,9 @@ class Api::V1::StreamingController < Api::BaseController
def streaming_api_url
Addressable::URI.parse(request.url).tap do |uri|
uri.host = Addressable::URI.parse(Rails.configuration.x.streaming_api_base_url).host
base_url = Addressable::URI.parse(Rails.configuration.x.streaming_api_base_url)
uri.host = base_url.host
uri.port = base_url.port
end.to_s
end
end