FIX: blank upgrade page when using S3 CDN and CSP

When CSP anbd S3 CDN are both enabled, the policy expects assets to come
from the S3 CDN, but `javascript_include_tag` returns a local or non-S3
CDN path. Using the `script_asset_path` helper from core fixes the issue.
This commit is contained in:
Penar Musaraj 2020-11-04 12:02:04 -05:00
parent 11bf3555b2
commit 3d37fd64ed
No known key found for this signature in database
GPG Key ID: E390435D881FF0F7
1 changed files with 3 additions and 2 deletions

View File

@ -9,8 +9,9 @@
<meta name="manager-client/config/environment" content="%7B%22modulePrefix%22%3A%22manager-client%22%2C%22environment%22%3A%22development%22%2C%22rootURL%22%3A%22/%22%2C%22locationType%22%3A%22hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22manager-client%22%2C%22version%22%3A%220.0.0+cfc32897%22%7D%2C%22exportApplicationGlobal%22%3Atrue%7D" />
<meta id="preloaded-data" data-preload="<%= { rootUrl: discourse_root_url, longPollingBaseUrl: long_polling_base_url }.to_json %>">
<%= javascript_include_tag "docker-manager-vendor" %>
<%= javascript_include_tag "docker-manager-app" %>
<script src="<%= script_asset_path('docker-manager-vendor') %>"></script>
<script src="<%= script_asset_path('docker-manager-app') %>"></script>
<%= stylesheet_link_tag "docker-manager-app" %>
<%= stylesheet_link_tag "docker-manager-vendor" %>
</head>