pickab00's avatar

Livewire component in Iframe not working

I have just started using Livewire and I have embedded by website url which consists of livewire component. I added this to an Iframe and every time something tried to re-render, it gives me a popup asking this:

"An embedded page at websitename says: This page has expired due to inactivity. Would you like to refresh this page?"

I have added the website embedded url in to "except" array of VerifyCSRFToken middleware but that didn't work either. How can I embed this in to an Iframe?

0 likes
1 reply
pickab00's avatar
pickab00
OP
Best Answer
Level 4

For anyone who stumbles on this. The idea is to stop csrf token to be passed every time a request is made. The fix is to disable csrf for all livewire components.

In the VerifyCsrfToken middleware, simply put

protected $except = [
        'livewire/*'
    ];
1 like

Please or to participate in this conversation.