instance method
redirect_to_https
Ruby on Rails 4.2.9
Since v4.0.13 Last seen in v4.2.9 PrivateSignature
redirect_to_https(request)
No documentation comment.
Parameters
-
requestreq
Source
# File actionpack/lib/action_dispatch/middleware/ssl.rb, line 34
def redirect_to_https(request)
host = @host || request.host
port = @port || request.port
location = "https://#{host}"
location << ":#{port}" if port != 80
location << request.fullpath
headers = { 'Content-Type' => 'text/html', 'Location' => location }
[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