I am using page caching on a rails site and I want a logged-in admin
to be served the non-cached site. This needs to be done in our nginx
config but I haven't been able to get anything to work.
My first (and most logical) attempt was to set a cookie for admins and
have a <p>conditional statement in the nginx config that checks for
that cookie. If it finds it, it should go directly to the proxy_pass.
Here is what that looked like:
<pre>
if ($http_cookie ~* "nocached=true") {
proxy_pass http://mongrel;
break;
}
</pre>
This did not work. If I put a rewrite line in that conditional
statement, it works. That means it is recognizing the cookie
correctly and that there is a problem with my approach. I think I
might need to use different syntax to use only the mongrels and not
load the cached pages but I don't know what that would look like. If
you have tried something like this, I'd love to hear what you found.
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Deploying Rails" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---