Nginx Rails Origin header didn’t match request.base_url

After installing SSL on Nginx server, rails application login page stopped working.

On log file (log/production.log), found following error

HTTP Origin header (https://domain.com) didn't match request.base_url (http://domain.com)

The Nginx config used was

The problem is solved by adding following to nginx config.

The new config is

See Nginx

Add a Comment

Your email address will not be published. Required fields are marked *