Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to implement HTTPS on selected pages which are making POST request

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?

like image 743
abhas Avatar asked Feb 01 '13 08:02

abhas


People also ask

How do I implement HTTPS on my website?

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.

How do I enable HTTPS request?

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.


1 Answers

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
like image 91
abhas Avatar answered Sep 29 '22 11:09

abhas