Sha256: 5848e5b4dd04817b23fee12de1a100d5218844eed9862c2c985fbf1b921932de

Contents?: true

Size: 274 Bytes

Versions: 9

Compression:

Stored size: 274 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?

        redirect_to protocol: 'https://'
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
locomotivecms-3.0.0.rc5 lib/locomotive/action_controller/ssl.rb
locomotivecms-3.0.0.rc4 lib/locomotive/action_controller/ssl.rb
locomotivecms-3.0.0.rc3 lib/locomotive/action_controller/ssl.rb
locomotivecms-3.0.0.rc2 lib/locomotive/action_controller/ssl.rb
locomotivecms-3.0.0.rc1 lib/locomotive/action_controller/ssl.rb
locomotivecms-3.0.0.pre.beta.1 lib/locomotive/action_controller/ssl.rb
locomotivecms-3.0.0.pre.alpha.3 lib/locomotive/action_controller/ssl.rb
locomotivecms-3.0.0.pre.alpha.2 lib/locomotive/action_controller/ssl.rb
locomotivecms-3.0.0.pre.alpha lib/locomotive/action_controller/ssl.rb