Sinatra不会在Chrome上@R_301_458@我的会话.它正在创建一个全新的会话,我失去了我以前的会话数据.
作为一个例子(类似于the Sinatra docs),我在做这样的事情:
enable :sessions get '/foo' do session[:user_id] = 123 session[:session_id] # "ABC",for example redirect to('/bar') end get '/bar' do # this is "DEF" when responding to Chrome (wrong),# but "ABC" when responding to Firefox or Safari (right) session[:session_id] # this is nil when responding to Chrome (wrong),# but 123 when responding to Firefox or Safari (right) session[:user_id] end
我认为这与不同浏览器在@R_301_458@响应后如何响应处理会话有关.有没有人看到类似的东西,或有任何想法如何解决这个,而仍在使用会话?
提前致谢!