Skip to content

Commit

Permalink
Change force SSL to false.
Browse files Browse the repository at this point in the history
  • Loading branch information
Winbobob committed Aug 31, 2015
1 parent e69d0a3 commit c426b6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ class ApplicationController < ActionController::Base

if Rails.env.production?
#forcing SSL only in the production mode
force_ssl
#force_ssl
end

helper_method :current_user_session, :current_user, :current_user_role?
protect_from_forgery with: :exception
before_filter :redirect_to_https
#before_filter :redirect_to_https
before_filter :set_time_zone
before_filter :authorize

Expand Down Expand Up @@ -65,9 +65,9 @@ def redirect_back(default = :root)
redirect_to request.env['HTTP_REFERER'] ? :back : default
end

def redirect_to_https
redirect_to :protocol => "https://" if Rails.env.production?
end
#def redirect_to_https
# redirect_to :protocol => "https://" if Rails.env.production?
#end

def set_time_zone
Time.zone = current_user.timezonepref if current_user
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# config.threadsafe!

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true
#config.force_ssl = true

# Set to :debug to see everything in the log.
config.log_level = :info
Expand Down

0 comments on commit c426b6d

Please sign in to comment.