mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: allow long polling to go to a different url
Added the site setting long_polling_base_url , this allows you to farm long polling to a different server. This setting is very important if a CDN is serving dynamic content.
This commit is contained in:
@@ -2,6 +2,14 @@ MessageBus.site_id_lookup do
|
||||
RailsMultisite::ConnectionManagement.current_db
|
||||
end
|
||||
|
||||
MessageBus.extra_response_headers_lookup do |env|
|
||||
{
|
||||
"Access-Control-Allow-Origin" => Discourse.base_url,
|
||||
"Access-Control-Allow-Methods" => "GET, POST",
|
||||
"Access-Control-Allow-Headers" => "X-SILENCE-LOGGER, X-Shared-Session-Key"
|
||||
}
|
||||
end
|
||||
|
||||
MessageBus.user_id_lookup do |env|
|
||||
user = CurrentUser.lookup_from_env(env)
|
||||
user.id if user
|
||||
|
||||
Reference in New Issue
Block a user