且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

管理员用户的活动管理员登录仅在本地主机上的Chrome中使用正确的凭据重定向回到登录页面

更新时间:2023-12-04 18:46:52

这最终成功了,并且有很多麻烦:

This ended up working, with a bunch of finagling:

https://github.com/codica2/rails-puma-ssl

我现在正在使用类似的方法在本地主机上启动Rails:
rails s -b'ssl:// localhost:3000?key = server.key& cert = server .crt'

I am now using something like this to launch rails on localhost: rails s -b 'ssl://localhost:3000?key=server.key&cert=server.crt'

/ etc / hosts 中,我不得不更改 127.0.0.1 localhost 127.0.0.1 localhost.ssl

In /etc/hosts, I had to change 127.0.0.1 localhost to 127.0.0.1 localhost.ssl

要查看本地主机,我必须添加 s,例如,Active Admin在此处: https:// localhost:3000 / admin

To see localhost, I have to add the "s" so, for example, Active Admin is here: https://localhost:3000/admin