Sha256: 8b16d1c0e201ce50094ad60b6c00a8a25818fbf28dc9182125d851b348dda5fb

Contents?: true

Size: 393 Bytes

Versions: 18

Compression:

Stored size: 393 Bytes

Contents

module Locomotive
  module Concerns
    module SslController

      extend ActiveSupport::Concern

      included do

        before_filter :require_ssl

      end

      private

      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

18 entries across 18 versions & 1 rubygems

Version Path
locomotivecms-3.3.0 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.3.0.rc3 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.3.0.rc2 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.1.2 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.2.1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.3.0.rc1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.2.0 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.2.0.rc2 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.2.0.rc1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.1.1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.1.0 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.1.0.rc3 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.1.0.rc2 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.1.0.rc1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.0.1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.0.0 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.0.0.rc7 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.0.0.rc6 app/controllers/locomotive/concerns/ssl_controller.rb