有一个名为 force_https 的设置,您需要通过 ENV 或 rails console 启用它。
force_https
另外,别忘了在您的代理上设置正确的 x-forwarded-proto。
x-forwarded-proto