# Problem with devise and nginx proxy cache

**URL:** <https://www.ruby-forum.com/t/problem-with-devise-and-nginx-proxy-cache/242644>\
**Category:** NGINX\
**Created:** [July 10, 2015, 6:04pm UTC](https://www.ruby-forum.com/t/problem-with-devise-and-nginx-proxy-cache/242644 "2015-07-10T18:04:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [July 10, 2015, 6:04pm UTC](https://www.ruby-forum.com/t/problem-with-devise-and-nginx-proxy-cache/242644/1 "2015-07-10T18:04:17Z")

</div>

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/](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](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:

> **[Problem with devise and nginx proxy cache](https://forum.nginx.org/read.php?2,260188,260188#msg-260188)**
>
> 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...
