File tree Expand file tree Collapse file tree
src/Model/TemplateEngine/Plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,11 +82,18 @@ public function afterCreate(
8282 }
8383
8484 // Additional check for Magewire if not sent as XHR or checkout page
85+ // Check diverse Request URI and Path Info variations to catch all Magewire output
8586 $ requestUri = $ this ->request ->getRequestUri ();
86- if ($ requestUri ) {
87- if (strpos ($ requestUri , 'magewire ' ) !== false ) {
88- return $ invocationResult ;
89- }
87+ $ pathInfo = $ this ->request ->getPathInfo ();
88+
89+ if (($ requestUri && stripos ($ requestUri , 'magewire ' ) !== false ) ||
90+ ($ pathInfo && stripos ($ pathInfo , 'magewire ' ) !== false )) {
91+ return $ invocationResult ;
92+ }
93+
94+ // Also check regex for partial matches if simple strings fail
95+ if (preg_match ('/magewire|livewire/i ' , (string )$ requestUri )) {
96+ return $ invocationResult ;
9097 }
9198
9299 // Check if inspector is enabled in configuration
You can’t perform that action at this time.
0 commit comments