How to access SSL client certificate from rack app

2019-08-05 05:51发布

Actually -- question title tells almost everything. In earlier Rails (2.x) I've seen code that was accessing client certificate details via request.env hash. My rack app is receiving call with env argument, but this data is not there. How can I access it?

1条回答
小情绪 Triste *
2楼-- · 2019-08-05 06:30

You should enable this on web server e.g. in Apache do SSLOptions +ExportCertData and/or +StdEnvVars. So you will get SSL_* vars in env.

查看更多
登录 后发表回答