Problem with devise and nginx proxy cache

birimblongas nginx-forum at nginx.us
Fri Jul 10 16:03:54 UTC 2015


Hi.
I have a RoR project which was working just fine.
But i've tryied to follow this site and add proxy cache to my nginx config:
http://vstark.net/2012/10/21/nginx-unicorn-performance-tweaks/ and devise
just won't sign_in anymore. I don't get any errors, just don't sign_in and
redirect me to login again.

As the autor from the link suggested to someone with same problem as I, i've
done this on my nginx conf: 

   location = /users/sign_in{
  proxy_pass http://app;
      proxy_set_header Host $http_host;
  proxy_ignore_headers Set-Cookie;
  proxy_ignore_headers Cache-Control;
  proxy_cache_bypass        $http_secret_header;
  add_header X-Cache-Status $upstream_cache_status;
}

The same to /login.
But devise still won't sign_in.

Anyone knows how to solve that?
Any more configs so I can skip cache to sign_in?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,260188,260188#msg-260188



More information about the nginx mailing list