我在我的L5网站上使用Internet Explorer的用户在重定向时保持会话数据丢失。重定向会话丢失(Internet Explorer)
正常重定向时会话数据丢失。我似乎并不孤单(10,000视图ie9 loses cookies after redirect )。但是甚至明确闪存的数据在重定向上丢失,请参阅第二个重定向版本的代码->with()
。
我已经完成了基本的家庭作业,并根据Stackoverflow建议添加了P3P作为标题的一部分。
第一控制器
public function getVerifyClient(){
// If user is an existing client
if(\Auth::check()){
if (\Auth::user()->role == 'Client'){
// dd(Session::get('service')); <-- Selected service part of session
return redirect('order'); <-- Session data lost
return redirect('order')->with('service', Session::get('service'); <-- Session data lost even with explicitly flashed data
}
\Auth::logout(); // Logout employees etc so they do not book in their account
}
...
}
第二控制器
public function getOrder(){
dd(Session::get('service'));
}
session.php文件
我session.php文件被设定为正常标准('domain' => null, 'path' => '/'
等),只例外是'encrypt'
,它设置为true
而不是false
。