diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 42d19813af9..298001e273b 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -42,7 +42,9 @@ class SiteController < ApplicationController apple_touch_icon_url: UrlHelper.absolute(SiteSetting.apple_touch_icon_url), favicon_url: UrlHelper.absolute(SiteSetting.favicon_url), title: SiteSetting.title, - description: SiteSetting.site_description + description: SiteSetting.site_description, + header_primary_color: ColorScheme.hex_for_name('header_primary') || '333333', + header_background_color: ColorScheme.hex_for_name('header_background') || 'ffffff' } results[:mobile_logo_url] = SiteSetting.mobile_logo_url.presence diff --git a/spec/requests/site_controller_spec.rb b/spec/requests/site_controller_spec.rb index 433c685ae9b..7e44a3d19df 100644 --- a/spec/requests/site_controller_spec.rb +++ b/spec/requests/site_controller_spec.rb @@ -21,6 +21,8 @@ describe SiteController do expect(json["apple_touch_icon_url"]).to eq("https://boom.com/apple/logo.png") expect(json["logo_small_url"]).to eq("http://boom.com/uploads/logo_small.png") expect(json["mobile_logo_url"]).to eq("https://a.a/a.png") + expect(json["header_primary_color"]).to eq("333333") + expect(json["header_background_color"]).to eq("ffffff") end end