My puma server redirects from http -> https (in development) but only with one URL: localhost:3000. As soon as I add anything to the end (i.e. localhost:3000/index) it no longer redirects (and the page errors out).
Is there a config option I'm missing (or need to comment out)? I currently have:
ssl_bind 'localhost', '3000' { ... } in config/puma.rb and
force_ssl = true in config/environments/development.rb.
force_sslis supposed to redirect all requests that come to http port to https, it cannot do anything when you're trying to connect via http to a https port.http and https should be bound to different ports (
bindandssl_bindoptions). It is customary to have http development server at port 3000, so bind ssl at some other port (for example - 8443, standard for https is 443, but it's privileged)Also for development specify ssl_options for redirecting: