Force SSL in Rails

1

Let's say you use your browser to interact with the camera on your computer or notebook in some way. This will only happen through an SSL connection, because browsers reject the permission to access the camera if it is not through SSL

How do I force Rails to always use an SSL connection?

    
asked by anonymous 16.09.2016 / 21:23

1 answer

2

Just go to /config/environments/production.rb and add the following parameter:

config.force_ssl = true
    
16.09.2016 / 21:23