1
votes

For some reason the session cookie on my app is not being set properly in production. This problem seemed to have just appeared overnight, with no changes on my end that I can think of. There is only one domain involved.

A session cookie is set when I run the app in development on localhost, so there is something strange happening with the server. If I inspect the cookies on the server side, it gives me a list, but the cookie is not being set in the browser. Also, I can manually create a test cookie on the server side, and it shows up on the browser. It's only the session cookie that is not showing up.

I tried changing the session store from memcached to cookiestore, which doesn't seem to have helped - still no session cookie. So I don't think it's the session_store code.

Using Rails 4.0.2 and passenger 4.0.19 with whatever version of nginx it installs. ruby 1.9.3. Any help would be appreciated - I'm completely stumped.

1
This is happening to me too. Please update if you find anything out, I'll do the same. - Adam Becker
If you want, gchat me (email address on my website). Would like to hear about your stack and try to figure this out. - Adam Becker
Will provide a complete response in a sec, but look here: github.com/phusion/passenger/pull/93 - Adam Becker

1 Answers

1
votes

They already fix this in github repo, and is being release at any moment.

Anyway, if someone is in rails2, and still has this bug, or don't want to update Passenger, we could fixed it doing:

class ApplicationController < ActionController::Base

   after_filter :set_headers

   def set_headers
      response.headers["Date"] = "#{Time.now.utc}"
   end

end

UPDATE

Here it is the official post explaining what happened.

I've just update Phusion Passenger gem to 4.0.30. it is quite straight forward and has the fix for this bug. Oficial Instruction here