about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/utils/config.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/utils/config.js')
-rw-r--r--app/javascript/flavours/glitch/utils/config.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/utils/config.js b/app/javascript/flavours/glitch/utils/config.js
new file mode 100644
index 000000000..932cd0cbf
--- /dev/null
+++ b/app/javascript/flavours/glitch/utils/config.js
@@ -0,0 +1,10 @@
+import ready from '../ready';
+
+export let assetHost = '';
+
+ready(() => {
+  const cdnHost = document.querySelector('meta[name=cdn-host]');
+  if (cdnHost) {
+    assetHost = cdnHost.content || '';
+  }
+});