about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/components
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-10-13 01:19:35 +0200
committerGitHub <noreply@github.com>2020-10-13 01:19:35 +0200
commit4c45b43cb8a3d902c130729d36d559ec9de23d3e (patch)
treeee915a79950dbad38d515a8870a30e40480bff5e /app/javascript/mastodon/features/ui/components
parent53b22d247fb8500ea977774d727fe0d41950189c (diff)
Change how CDN_HOST is passed down to make assets build reproducible (#14381)
* Change how CDN_HOST is passed down to make assets build reproducible

* Change webpacker/webpack configuration to dynamically load publicPath based on meta header

* Fix embedded layout missing the cdn-host meta header
Diffstat (limited to 'app/javascript/mastodon/features/ui/components')
-rw-r--r--app/javascript/mastodon/features/ui/components/focal_point_modal.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/ui/components/focal_point_modal.js b/app/javascript/mastodon/features/ui/components/focal_point_modal.js
index 926a495d1..e19f277d8 100644
--- a/app/javascript/mastodon/features/ui/components/focal_point_modal.js
+++ b/app/javascript/mastodon/features/ui/components/focal_point_modal.js
@@ -20,6 +20,7 @@ import GIFV from 'mastodon/components/gifv';
 import { me } from 'mastodon/initial_state';
 import tesseractCorePath from 'tesseract.js-core/tesseract-core.wasm.js';
 import tesseractWorkerPath from 'tesseract.js/dist/worker.min.js';
+import { assetHost } from 'mastodon/utils/config';
 
 const messages = defineMessages({
   close: { id: 'lightbox.close', defaultMessage: 'Close' },
@@ -50,8 +51,6 @@ const removeExtraLineBreaks = str => str.replace(/\n\n/g, '******')
   .replace(/\n/g, ' ')
   .replace(/\*\*\*\*\*\*/g, '\n\n');
 
-const assetHost = process.env.CDN_HOST || '';
-
 class ImageLoader extends React.PureComponent {
 
   static propTypes = {