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

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

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

問(wèn)題描述

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

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

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

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è)問(wèn)題不是因?yàn)闆](méi)有添加@csrf

推薦答案

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

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 頁(yè)面已過(guò)期"從已清除的會(huì)話中單擊注銷(xiāo)后的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

Magento products by categories(按類(lèi)別劃分的 Magento 產(chǎn)品)
Resource interpreted as image but transferred with MIME type text/html - Magento(資源被解釋為圖像但使用 MIME 類(lèi)型 text/html 傳輸 - Magento)
Is there an event for customer account registration in Magento?(Magento 中是否有客戶帳戶注冊(cè)事件?)
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 管理員登錄頁(yè)面)
Get Order Increment Id in Magento(在 Magento 中獲取訂單增量 ID)
主站蜘蛛池模板: a免费在线| 欧美成人性生活 | 午夜无码国产理论在线 | 精品在线一区二区 | 国产不卡视频 | a级在线| 男人av网 | 狠狠色香婷婷久久亚洲精品 | 91视频在线| 黄色小视频大全 | 国产日韩欧美 | 欧洲色| 在线视频国产一区 | 一区二区三区视频免费观看 | 亚洲国产精品久久久 | 亚洲精品乱码久久久久久按摩观 | 久久蜜桃资源一区二区老牛 | 成人做爰69片免费观看 | 国产精品三级久久久久久电影 | 日日操夜夜操天天操 | 亚洲一区二区免费视频 | 91久久爽久久爽爽久久片 | 国产东北一级毛片 | 久久国产一区 | 国产精品久久久久一区二区 | 亚洲天堂久久新 | 亚洲成人动漫在线观看 | 久久国产精品一区二区 | 国产综合在线视频 | 久久极品| 91视频.| www.狠狠操 | 一区二区三区四区免费观看 | 看片国产 | 99热视 | 国产精品久久久 | 人成久久 | 欧美激情一区二区三级高清视频 | 在线免费观看a级片 | 精品久久电影 | 亚洲精品欧美 |