mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 23:21:11 +08:00
FIX: Ember CLI was losing some preloaded data (#13406)
The `bootstrap.json` contains most preloaded information but some routes provide extra information, such as invites. This fixes the issue by having the preload request pass on the preloaded data from the source page, which is then merged with the bootstrap's preloaded data for the final HTML payload.
This commit is contained in:
@ -322,7 +322,9 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def send_ember_cli_bootstrap
|
||||
head 200, content_type: "text/html", "X-Discourse-Bootstrap-Required": true
|
||||
response.headers['X-Discourse-Bootstrap-Required'] = true
|
||||
response.headers['Content-Type'] = "application/json"
|
||||
render json: { preloaded: @preloaded }
|
||||
end
|
||||
|
||||
# If a controller requires a plugin, it will raise an exception if that plugin is
|
||||
|
Reference in New Issue
Block a user