I am trying to implement HTTPS on selected pages which are making POST request in my rails 3.1 project. But not have any success after trying all kind of gems ssl_requirement
,rack-ssl-enforcer
. All the gems are helping in making GET request as HTTPS but not have any success for POST request.
Can anybody please help me with this problem?
To use HTTPS with your domain name, you need a SSL or TLS certificate installed on your website. Your web host (Web Hosting Provider) may offer HTTPS security or you can request a SSL/TLS certificate from Certificate Authorities and install it yourself. SSL/TLS certificates may need to be renewed periodically.
Create a private and public key pair, and prepare a Certificate Signing Request (CSR), including information about the organization and the public key. Contact a certification authority and request an HTTPS certificate, based on the CSR. Obtain the signed HTTPS certificate and install it on your web server.
I found the solution used rack-ssl-enforcer
and put these lines in my application.rb file which make it worked
config.middleware.use Rack::SslEnforcer, :only => [%r{^/users/}], :mixed => true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With