about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/util/config.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/util/config.js')
-rw-r--r--app/javascript/flavours/glitch/util/config.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/util/config.js b/app/javascript/flavours/glitch/util/config.js
new file mode 100644
index 000000000..c3e2b73ae
--- /dev/null
+++ b/app/javascript/flavours/glitch/util/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 || '';
+  }
+});