mirror of
https://github.com/discourse/discourse.git
synced 2025-04-03 05:39:41 +08:00
Revert "FIX: wrong site origin in message bus header"
This reverts commit 93b49a0dd53fd1edbe69a37b36ce3c82ef132765.
This commit is contained in:
parent
6a530b8949
commit
b97b426d34
@ -10,14 +10,14 @@ end
|
|||||||
def setup_message_bus_env(env)
|
def setup_message_bus_env(env)
|
||||||
return if env["__mb"]
|
return if env["__mb"]
|
||||||
|
|
||||||
host = RailsMultisite::ConnectionManagement.host(env)
|
|
||||||
RailsMultisite::ConnectionManagement.with_hostname(host) do
|
|
||||||
extra_headers = {
|
extra_headers = {
|
||||||
"Access-Control-Allow-Origin" => Discourse.base_url_no_prefix,
|
"Access-Control-Allow-Origin" => Discourse.base_url_no_prefix,
|
||||||
"Access-Control-Allow-Methods" => "GET, POST",
|
"Access-Control-Allow-Methods" => "GET, POST",
|
||||||
"Access-Control-Allow-Headers" => "X-SILENCE-LOGGER, X-Shared-Session-Key, Dont-Chunk, Discourse-Visible"
|
"Access-Control-Allow-Headers" => "X-SILENCE-LOGGER, X-Shared-Session-Key, Dont-Chunk, Discourse-Visible"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
host = RailsMultisite::ConnectionManagement.host(env)
|
||||||
|
RailsMultisite::ConnectionManagement.with_hostname(host) do
|
||||||
user = nil
|
user = nil
|
||||||
begin
|
begin
|
||||||
user = CurrentUser.lookup_from_env(env)
|
user = CurrentUser.lookup_from_env(env)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user