Check if Livewire request came from Filament
I have the following macro in my AdminPanelProvider to check if requests came from Filament, this is inspired by
This works for the default views across the panel, however the
Is there a recommended approach to check if a Livewire request came from Filament? I don't feel like adding livewire.* is specific enough, since other panels or other Livewire components outside Filament would give false positives.
I've looked into adding (persistent) middlewares to my panel providing adding a x-filament header myself, but these middlewares seem to run after the Livewire request.
Thanks in advance!
Request::inertia() provided by Inertia.js:This works for the default views across the panel, however the
livewire.update route ofcourse doesn't fall under this.Is there a recommended approach to check if a Livewire request came from Filament? I don't feel like adding livewire.* is specific enough, since other panels or other Livewire components outside Filament would give false positives.
I've looked into adding (persistent) middlewares to my panel providing adding a x-filament header myself, but these middlewares seem to run after the Livewire request.
Thanks in advance!