mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
DEV: Simplify ember-cli proxy strategy (#24242)
Previously, the app HTML served by the Ember-CLI proxy was generated based on a 'bootstrap json' payload generated by Rails. This inevitably leads to differences between the Rails HTML and the Ember-CLI HTML. This commit overhauls our proxying strategy. Now, we totally ignore the ember-cli `index.html` file. Instead, we take the full HTML from Rails and surgically replace script URLs based on a `data-discourse-entrypoint` attribute. This should be faster (only one request to Rails), more robust, and less confusing for developers.
This commit is contained in:
@ -27,8 +27,6 @@ Discourse::Application.routes.draw do
|
||||
match "/404", to: "exceptions#not_found", via: %i[get post]
|
||||
get "/404-body" => "exceptions#not_found_body"
|
||||
|
||||
get "/bootstrap" => "bootstrap#index"
|
||||
|
||||
if Rails.env.test? || Rails.env.development?
|
||||
get "/bootstrap/plugin-css-for-tests.css" => "bootstrap#plugin_css_for_tests"
|
||||
end
|
||||
|
Reference in New Issue
Block a user