From b632ffd8021019b5659b2d9055392725698e0934 Mon Sep 17 00:00:00 2001 From: Mark VanLandingham Date: Wed, 6 Oct 2021 15:41:52 -0500 Subject: [PATCH] DEV: Allow actions to change the manifest endpoint (#14522) --- app/helpers/application_helper.rb | 7 +++++++ app/views/layouts/application.html.erb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8bd509f1837..a5cfbb9aba7 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -613,6 +613,13 @@ module ApplicationHelper absolute_url end + def manifest_url + # If you want the `manifest_url` to be different for a specific action, + # in the action set @manifest_url = X. Originally added for chat to add a + # separate manifest + @manifest_url || "#{Discourse.base_path}/manifest.webmanifest" + end + def can_sign_up? SiteSetting.allow_new_registrations && !SiteSetting.invite_only && diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 26dc3f6a404..23c2fbda66e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -45,7 +45,7 @@ <%= render_google_tag_manager_head_code %> <%= render_google_universal_analytics_code %> - + crossorigin="use-credentials"> <%- if include_ios_native_app_banner? %>