How to access SSL client certificate from rack app

帅比萌擦擦* 提交于 2020-01-05 18:48:38

问题


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:


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.



来源:https://stackoverflow.com/questions/7726182/how-to-access-ssl-client-certificate-from-rack-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!