Fix cross-origin loading of locales (#25498)

pull/25502/head
Claire 2023-06-18 15:47:04 +02:00 committed by GitHub
parent 9e245d147b
commit 64f7a11658
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@
= stylesheet_pack_tag 'common', media: 'all', crossorigin: 'anonymous'
= stylesheet_pack_tag current_theme, media: 'all', crossorigin: 'anonymous'
= javascript_pack_tag 'common', crossorigin: 'anonymous'
= preload_pack_asset "locale/#{I18n.locale}-json.js"
= preload_pack_asset "locale/#{I18n.locale}-json.js", crossorigin: 'anonymous'
= csrf_meta_tags unless skip_csrf_meta_tags?
%meta{ name: 'style-nonce', content: request.content_security_policy_nonce }

View File

@ -14,7 +14,7 @@
= stylesheet_pack_tag 'common', media: 'all', crossorigin: 'anonymous'
= stylesheet_pack_tag Setting.default_settings['theme'], media: 'all', crossorigin: 'anonymous'
= javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
= preload_pack_asset "locale/#{I18n.locale}-json.js"
= preload_pack_asset "locale/#{I18n.locale}-json.js", crossorigin: 'anonymous'
= render_initial_state
= javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
%body.embed