Rails: activating SSL support gets Chrome confused

后端 未结 4 503
逝去的感伤
逝去的感伤 2021-01-12 09:09

There is a nice option to config for the Rails app:

config.force_ssl = true

However it seems that just putting that to true doesn\'t get the HTTPS connection

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-12 09:19

    Open your Chrome Developer Tools when you're at localhost: Then you can right click the refresh button ↻ and select "Empty cache and hard reload".

    This error might also happens to you, if you start your server in the production environment, where HSTS is enabled.

    Chrome redirects you to https://localhost:3000/ and says "SSL connection error".

提交回复
热议问题