@@ -1181,22 +1181,6 @@ NOTE: Certain exceptions are only rescuable from the `ApplicationController` cla
Force HTTPS protocol
--------------------
Sometime you might want to force a particular controller to only be accessible via an HTTPS protocol for security reasons. You can use the `force_ssl` method in your controller to enforce that:
```ruby
classDinnerController
force_ssl
end
```
Just like the filter, you could also pass `:only` and `:except` to enforce the secure connection only to specific actions:
```ruby
classDinnerController
force_sslonly: :cheeseburger
# or
force_sslexcept: :cheeseburger
end
```
Please note that if you find yourself adding `force_ssl` to many controllers, you may want to force the whole application to use HTTPS instead. In that case, you can set the `config.force_ssl` in your environment file.
If you'd like to ensure that communication to your controller is only possible
via HTTPS, you should do so by enabling the `ActionDispatch::SSL` middleware via
`config.force_ssl` in your environment configuration.