I want to make only one page request ssl certificate. I tried to use ssl_requirement gem or bartt-ssl_requirement, so I tried:
In my pages_controller:
ssl_required :admin
In my application controller:
include ::SslRequirement
All my pages requires ssl, all are using https.
I tried to generate certificate only for admin page – entered in Common Name field site/admin, but by doing this my application doesn’t working now.
Can someone help me with this ?
Have you tried using the SSL Enforcer gem by Tobias Matthies?
It’s a pretty flexible and robust gem that will allow you to choose which paths need HTTPS and which don’t…
Basically all you need to do is this:
Github page for more info: https://github.com/tobmatth/rack-ssl-enforcer
cheers