instance method redirect_to_https

Ruby on Rails 4.0.13

Since v4.0.13 Last seen in v4.2.9 Private

Available in: v4.0.13 v4.1.16 v4.2.9

Signature

redirect_to_https(request)

No documentation comment.

Parameters

request req
Source
# File actionpack/lib/action_dispatch/middleware/ssl.rb, line 34
      def redirect_to_https(request)
        url        = URI(request.url)
        url.scheme = "https"
        url.host   = @host if @host
        url.port   = @port if @port
        headers    = { 'Content-Type' => 'text/html', 'Location' => url.to_s }

        [301, headers, []]
      end

Defined in actionpack/lib/action_dispatch/middleware/ssl.rb line 34 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::SSL

Type at least 2 characters to search.

↑↓ navigate · open · esc close