diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/environment.rb | 1 | ||||
-rw-r--r-- | config/initializers/alaveteli.rb | 4 | ||||
-rw-r--r-- | config/test.yml | 5 |
3 files changed, 9 insertions, 1 deletions
diff --git a/config/environment.rb b/config/environment.rb index d2e2bc9d1..196680b23 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -3,4 +3,3 @@ require File.expand_path('../application', __FILE__) # Initialize the rails application Alaveteli::Application.initialize! - diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb index 458201164..06d05563b 100644 --- a/config/initializers/alaveteli.rb +++ b/config/initializers/alaveteli.rb @@ -29,6 +29,10 @@ ALAVETELI_VERSION = '0.8' # Domain for URLs (so can work for scripts, not just web pages) ActionMailer::Base.default_url_options[:host] = AlaveteliConfiguration::domain +# https links in emails if forcing SSL +if AlaveteliConfiguration::force_ssl + ActionMailer::Base.default_url_options[:protocol] = "https" +end # fallback locale and available locales available_locales = AlaveteliConfiguration::available_locales.split(/ /) diff --git a/config/test.yml b/config/test.yml index fbec24346..5c08e928b 100644 --- a/config/test.yml +++ b/config/test.yml @@ -13,6 +13,11 @@ SITE_NAME: 'Alaveteli' # It makes things simpler if this is the same as the Rails test domain test.host DOMAIN: 'test.host' +# If true forces everyone (in the production environment) to use encrypted connections +# (via https) by redirecting unencrypted connections. This is *highly* recommended +# so that logins can't be intercepted by naughty people. +FORCE_SSL: false + # ISO country code of country currrently deployed in # (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) ISO_COUNTRY_CODE: DE |