久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Laravel 5.8 顯示“419 頁面已過期"從已清除的會

Laravel 5.8 showing quot;419 Page Expiredquot; after clicking logout from an already cleared session(Laravel 5.8 顯示“419 頁面已過期從已清除的會話中單擊注銷后)
本文介紹了Laravel 5.8 顯示“419 頁面已過期"從已清除的會話中單擊注銷后的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我運行了 php artisan make:auth 命令,然后我會一步步解釋我接下來要做什么來理解場景,

I run the php artisan make:auth command and I will explain step by step what I do after that to understand the scenario,

  • 登錄新會話 (example.com/home)
  • 打開一個新標簽并粘貼網址,即 example.com/home.
  • 現在 2 個標簽頁在同一個會話中打開.
  • 我從其中一個選項卡中單擊了注銷,它運行良好
  • 然后,當我嘗試從另一個選項卡注銷時,它給我一個錯誤消息,提示419 頁面已過期",即使重新加載后它也無處可去.

問題是,這種情況可能會出現,我不想看到這個錯誤信息,點擊注銷后直接注銷,即使會話已過期.

The thing is, these kind of scenarios may arise, and I don't want to see this error message, just logout after clicking logout, even if the session is expired.

注意:這個問題不是因為沒有添加@csrf

推薦答案

嗯,這是一個明顯的信息,您可以嘗試為該頁面制作更好的布局,但仍然最好顯示它以便用戶知道發生了什么.如果您想以不同的方式處理它,您可以嘗試重定向到登錄頁面.

Well that's an obvious message you can maybe try to make a better layout for that page, but still it is good to show it so the user knows what happened. If you want to handle it differently you can try to redirect to the login page.

因此在您的 appExceptionsHandler.php 文件中的 render 方法中添加:

So in your appExceptionsHandler.php file within the render method add this:

if ($exception instanceof IlluminateSessionTokenMismatchException) {
    return redirect()->route('login');
}

這篇關于Laravel 5.8 顯示“419 頁面已過期"從已清除的會話中單擊注銷后的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Magento products by categories(按類別劃分的 Magento 產品)
Resource interpreted as image but transferred with MIME type text/html - Magento(資源被解釋為圖像但使用 MIME 類型 text/html 傳輸 - Magento)
Is there an event for customer account registration in Magento?(Magento 中是否有客戶帳戶注冊事件?)
Magento addFieldToFilter: Two fields, match as OR, not AND(Magento addFieldToFilter:兩個字段,匹配為 OR,而不是 AND)
quot;Error 404 Not Foundquot; in Magento Admin Login Page(“未找到錯誤 404在 Magento 管理員登錄頁面)
Get Order Increment Id in Magento(在 Magento 中獲取訂單增量 ID)
主站蜘蛛池模板: 亚洲品质自拍视频 | 成人av一区 | 超碰美女在线 | 国产精品一区二区在线 | 免费观看一级毛片 | 欧美日韩一区在线 | 日韩精品一区二区在线观看 | 国产乱人伦 | 黑人精品欧美一区二区蜜桃 | 天天干天天操天天看 | 日韩影院在线观看 | 日韩免费福利视频 | 国产精品99久久免费观看 | 国产成人叼嘿视频在线观看 | 99视频免费在线 | 国产成人亚洲精品自产在线 | 欧美日韩一区二区三区四区五区 | 亚洲美女一区二区三区 | 国产高清一区二区三区 | 日本电影网站 | 亚洲一区二区av | 欧美a区| 欧美日韩高清免费 | 国产真实精品久久二三区 | 欧美一区二区三区在线观看视频 | 欧美一区二区三区在线观看视频 | 日韩不卡一二区 | 一级大片免费 | 国产精品久久久久影院色老大 | 欧美精品在线观看 | 日韩在线中文字幕 | 精品日韩 | 七七婷婷婷婷精品国产 | 亚洲网在线 | 国产片一区二区三区 | 欧美一级视频在线观看 | 欧美一级三级在线观看 | 亚洲欧美一区二区三区情侣bbw | 成人免费视频网站在线看 | 午夜视频网站 | 中文字幕爱爱视频 |