Sha256: 1fd68767bbe257ec96bce0c0e22944050b648b6ba1a804a6b6143774a468ffde

Contents?: true

Size: 393 Bytes

Versions: 15

Compression:

Stored size: 393 Bytes

Contents

module Locomotive
  module Concerns
    module SslController

      extend ActiveSupport::Concern

      included do

        before_action :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

15 entries across 15 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.2.0.alpha1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.1.1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.1.0 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.1.0.rc1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.0.3 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.0.2 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.0.1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.0.0 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.0.0.rc0 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.0.0.alpha3 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.4.1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.0.0.alpha2 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-4.0.0.alpha1 app/controllers/locomotive/concerns/ssl_controller.rb
locomotivecms-3.4.0 app/controllers/locomotive/concerns/ssl_controller.rb