about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-10-11 14:12:36 +0200
committerThibaut Girka <thib@sitedethib.com>2018-10-11 14:12:36 +0200
commit8f720be9f3ad314f0c0b0c7c0cc81616ba20e8fd (patch)
tree62803c2547eace343e63a06499b8406967836cc0 /app/helpers
parenta02244f17c841f641c9ed289fb592b73fecf472d (diff)
parentac7df62a0441b95ec04fd9111a9394795dd53ff2 (diff)
Merge commit 'ac7df62a0441b95ec04fd9111a9394795dd53ff2' into glitch-soc/merge-upstream
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c002017ef..e9b48fa98 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -82,4 +82,20 @@ module ApplicationHelper
     output << 'rtl' if locale_direction == 'rtl'
     output.reject(&:blank?).join(' ')
   end
+
+  def cdn_host
+    ENV['CDN_HOST'].presence
+  end
+
+  def cdn_host?
+    cdn_host.present?
+  end
+
+  def storage_host
+    ENV['S3_ALIAS_HOST'].presence || ENV['S3_CLOUDFRONT_HOST'].presence
+  end
+
+  def storage_host?
+    storage_host.present?
+  end
 end