diff --git a/config/application.yml.example b/config/application.yml.example index 0cd60599e..b6cd04024 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -48,6 +48,10 @@ defaults: &defaults s3_region: 'us-east-1' + # Serve static assets via the appserver, this is not recommended for production use, + # let your reverse proxy/webserver do it. + serve_static_assets: false + # # Settings # @@ -68,6 +72,7 @@ defaults: &defaults # (expressed as an array of Diaspora IDs) community_spotlight: - 'diasporahq@joindiaspora.com' + # Email to send spotlight suggestions to spotlight_suggest_email: '' @@ -85,7 +90,6 @@ defaults: &defaults # Enable extensive logging to log/{development,test,production}.log debug: false - # Enable extensive logging to websocket server. socket_debug : false @@ -212,6 +216,7 @@ defaults: &defaults development: <<: *defaults + serve_static_assets: true production: <<: *defaults @@ -225,11 +230,14 @@ test: pod_url: "http://localhost:9887" socket_port: 8081 open_invitations: true + serve_static_assets: true integration_1: <<: *defaults pod_url: "http://localhost:45789" + serve_static_assets: true integration_2: <<: *defaults pod_url: "http://localhost:34658" + serve_static_assets: true diff --git a/config/initializers/static_assets.rb b/config/initializers/static_assets.rb new file mode 100644 index 000000000..88257045b --- /dev/null +++ b/config/initializers/static_assets.rb @@ -0,0 +1,7 @@ +# Copyright (c) 2010-2011, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3 or later. See +# the COPYRIGHT file. + +Diaspora::Application.configure do + config.serve_static_assets = AppConfig[:serve_static_assets] unless AppConfig[:serve_static_assets].nil? +end