Sha256: f906228afe657764ab22948cd3b04be192d831950bcc97a107a78e28b2678e1e

Contents?: true

Size: 463 Bytes

Versions: 17

Compression:

Stored size: 463 Bytes

Contents

module Locomotive
  module ActionController
    module Ssl

      def require_ssl
        # already a ssl request or ssl disabled ?
        return if !Locomotive.config.enable_admin_ssl || request.ssl?

        # only require ssl for requests for the main domain
        if !Locomotive.config.multi_sites? || Locomotive.config.multi_sites.domain == request.domain
          redirect_to protocol: 'https://'
        end

        true
      end

    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.6 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.6.rc2 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.6.rc1 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.5 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.4 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.3 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.2 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.1 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.0 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.0.rc3 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.0.rc2 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.5.0.rc1 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.4.1 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.4.0 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.3.1 lib/locomotive/action_controller/ssl.rb
locomotive_cms-2.3.0 lib/locomotive/action_controller/ssl.rb