Permalink
Browse files

Fixes for HTTPS.

  • Loading branch information...
paneq committed Jul 4, 2009
1 parent 0dcc830 commit 1fba9476c3e1489d6c1961a9ff29e145af98bae9
Showing with 22 additions and 2 deletions.
  1. +8 −0 app/controllers/application_controller.rb
  2. +2 −0 config/environment.rb
  3. +3 −1 config/preinitializer.rb
  4. +9 −1 config/site_keys_example.yml
@@ -20,6 +20,14 @@ class ApplicationController < ActionController::Base

protected


def ssl_required?
SSL_REQUIRED
end

def ssl_allowed?
SSL_ALLOWED
end

def extract_form_id
params[:form_id]
@@ -25,6 +25,8 @@
APP_DOMAIN = config.app_domain
APP_NAME = config.app_name
APP_EMAIL = config.app_email
SSL_REQUIRED = config.ssl_required == "true"
SSL_ALLOWED = config.ssl_allowed == "true"

# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
@@ -8,7 +8,9 @@ module FileSiteKeys
:rest_auth_digest_stretches,
:app_domain,
:app_name,
:app_email
:app_email,
:ssl_allowed,
:ssl_required
]

ATTRIBUTES.freeze
@@ -8,6 +8,8 @@ development:
app_domain: localhost:3000
app_name: Manage My Money
app_email: example@example.org
ssl_required: false
ssl_allowed: false

test:
session_key: 3m_session_test
@@ -19,6 +21,8 @@ test:
app_domain: example.org
app_name: Manage My Money
app_email: example@example.org
ssl_required: false
ssl_allowed: false

selenium:
session_key: 3m_session_selenium
@@ -30,6 +34,8 @@ selenium:
app_domain: localhost:7000
app_name: Manage My Money
app_email: example@example.org
ssl_required: false
ssl_allowed: false

production:
#read environment.rb
@@ -43,4 +49,6 @@ production:
rest_auth_digest_stretches: 10
app_domain: example.org
app_name: Manage My Money
app_email: example@example.org
app_email: example@example.org
ssl_required: false
ssl_allowed: false

0 comments on commit 1fba947

Please sign in to comment.