updated based on comments from cantino

Albert Sun 11 年之前
父節點
當前提交
0481c17dac
共有 3 個文件被更改,包括 5 次插入3 次删除
  1. 3 1
      .env.example
  2. 1 1
      config/environments/production.rb
  3. 1 1
      config/environments/staging.rb

+ 3 - 1
.env.example

@@ -6,7 +6,9 @@ APP_SECRET_TOKEN=REPLACE_ME_NOW!
6 6
 # This is the domain where your Huginn instance will be running.  The default should work
7 7
 # for development, but it needs to be changed when you deploy to a production environment.
8 8
 DOMAIN=localhost:3000
9
-ASSET_HOST=http://assets.example.com
9
+
10
+# Optionally set an asset host
11
+# ASSET_HOST=http://assets.example.com
10 12
 
11 13
 ############################
12 14
 #      Database Setup      #

+ 1 - 1
config/environments/production.rb

@@ -43,7 +43,7 @@ Huginn::Application.configure do
43 43
   # config.cache_store = :mem_cache_store
44 44
 
45 45
   # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
-  if ENV['ASSET_HOST']
46
+  if ENV['ASSET_HOST'].present?
47 47
     config.action_controller.asset_host = ENV['ASSET_HOST']
48 48
   end
49 49
 

+ 1 - 1
config/environments/staging.rb

@@ -43,7 +43,7 @@ Huginn::Application.configure do
43 43
   # config.cache_store = :mem_cache_store
44 44
 
45 45
   # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
-  if ENV['ASSET_HOST']
46
+  if ENV['ASSET_HOST'].present?
47 47
     config.action_controller.asset_host = ENV['ASSET_HOST']
48 48
   end
49 49