6

I have an pretty simple app hosted on EC2 built with Sinatra, served with thin behind nginx. The problem is that with Chrome, the session variables get 'lost' in Sinatra. It does not happen in Firefox.

This is using Rack::Session::Cookie. This is similar to this issue: Sinatra not persisting session with redirect on Chrome

Any insights in how to solve this issues in Chrome would be appreciated.

Community
  • 1
  • 1
Sam M
  • 61
  • 2
  • 1
    I'm having the same exact issue with Chrome (i.e. works on Firefox, Safari). Do you remember the issue? – anthv123 Oct 20 '14 at 23:34

1 Answers1

0

Make sure you are setting the following:

configure :development do
  set(:session_secret, 'a random string that wont change')
end

configure :production do
  set(:session_secret, '*&(${)UIJH$(&*(&*(@(*)(!)))IUYA0984)})')
end

configure do
  enable :sessions    
end
ghstcode
  • 2,902
  • 1
  • 20
  • 30
  • 1
    Yes, I have a secret set and sessions enabled. Like I said: sessions are working but in Chrome the session information disappears on certain requests. I think it has to do with chromes handling of the cookie. – Sam M Oct 24 '13 at 19:56