mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 11:48:08 +08:00
FIX: correctly uses request_uri to generate load_more_url (#19680)
Before this change we were generating an incorrect absolute URL: `https://chat/api/channels...`
This commit is contained in:
@ -23,7 +23,7 @@ class Chat::Api::ChatChannelsController < Chat::Api
|
||||
end
|
||||
|
||||
load_more_params = options.merge(offset: options[:offset] + options[:limit]).to_query
|
||||
load_more_url = URI::HTTP.build(path: "/chat/api/channels", query: load_more_params)
|
||||
load_more_url = URI::HTTP.build(path: "/chat/api/channels", query: load_more_params).request_uri
|
||||
|
||||
render json: serialized_channels, root: "channels", meta: { load_more_url: load_more_url }
|
||||
end
|
||||
|
Reference in New Issue
Block a user