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

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

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

問題描述

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

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

  • 登錄新會(huì)話 (example.com/home)
  • 打開一個(gè)新標(biāo)簽并粘貼網(wǎng)址,即 example.com/home.
  • 現(xiàn)在 2 個(gè)標(biāo)簽頁在同一個(gè)會(huì)話中打開.
  • 我從其中一個(gè)選項(xiàng)卡中單擊了注銷,它運(yùn)行良好
  • 然后,當(dāng)我嘗試從另一個(gè)選項(xiàng)卡注銷時(shí),它給我一個(gè)錯(cuò)誤消息,提示419 頁面已過期",即使重新加載后它也無處可去.

問題是,這種情況可能會(huì)出現(xiàn),我不想看到這個(gè)錯(cuò)誤信息,點(diǎn)擊注銷后直接注銷,即使會(huì)話已過期.

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.

注意:這個(gè)問題不是因?yàn)闆]有添加@csrf

推薦答案

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

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');
}

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

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

相關(guān)文檔推薦

Magento products by categories(按類別劃分的 Magento 產(chǎn)品)
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:兩個(gè)字段,匹配為 OR,而不是 AND)
quot;Error 404 Not Foundquot; in Magento Admin Login Page(“未找到錯(cuò)誤 404在 Magento 管理員登錄頁面)
Get Order Increment Id in Magento(在 Magento 中獲取訂單增量 ID)
主站蜘蛛池模板: 成人av在线播放 | 免费黄色录像片 | 国产视频精品免费 | 成人在线免费网站 | 日本在线小视频 | 色网站视频 | 一区二区三区视频在线观看 | 激情六月丁香 | wwwxxx国产| 91久久久久久久久久久久久 | 国产精品2区 | 久久久国产一区 | 天天干夜夜操视频 | 久干网 | 99免费精品 | 亚洲欧洲中文 | 欧美a免费 | 免费在线看黄视频 | 黄色毛片在线观看 | 久久久久国产成人精品亚洲午夜 | 极品久久 | 中文字幕一区二区三区日韩精品 | 人人草天天草 | www.中文字幕av| 欧美亚洲一区二区三区 | 亚洲成人一区二区 | av网站在线看 | www国产成人免费观看视频,深夜成人网 | 国产精品久久久久久久免费大片 | 刘亦菲国产毛片bd | 最近中文字幕免费 | 亚洲欧美激情精品一区二区 | 日韩一区二区三区在线视频 | 久久免费观看一级毛片 | 美国一级黄色片 | 国产一级片网站 | 久久99精品久久久 | 中文精品一区二区 | 国产成人在线免费 | 欧美中文在线 | 欧美一区二区三区久久精品 |