zoukankan      html  css  js  c++  java
  • 【laravel】Laravel 5 TokenMismatchException on PHP 5.6.9

    When I realized this was only happening in IE and Chrome, but not Firefox, it led me to the fix. The app was using AddThis share buttons and the javascript was adding an iframe to the pages. This issue is resolved by adding a P3P header to the VerifyCsrfToken Middleware. Hope this saves somebody the hours I lost.
     
     
    public function handle($request, Closure $next)
        {
            $response = $next($request);
    
            if (last(explode('\',get_class($response))) != 'RedirectResponse') {
                $response->header('P3P', 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
            }
    
            return $response;
        }

    http://stackoverflow.com/questions/30490821/laravel-5-tokenmismatchexception-on-php-5-6-9
  • 相关阅读:
    专题三--1005
    专题三--1009
    专题三--1017
    背包九讲
    专题三--1003
    专题三--1004
    专题三--1015
    [洛谷P1220]关路灯
    [洛谷P1776]宝物筛选
    [USACO14JAN]Recording the Moolympics
  • 原文地址:https://www.cnblogs.com/china-flint/p/9685450.html
Copyright © 2011-2022 走看看