Skip to content

Commit fbd9aa9

Browse files
committed
feat: block magewire/livewire AJAX endpoints in InspectorHints
1 parent 91f7f50 commit fbd9aa9

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

src/Model/TemplateEngine/Plugin/InspectorHints.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,9 @@ public function afterCreate(
8181
return $invocationResult;
8282
}
8383

84-
// Disable for Hyva Checkout (Magewire-based) - check both URI and PathInfo
84+
// Block any magewire/livewire AJAX endpoints only
8585
$requestUri = $this->request->getRequestUri();
86-
$pathInfo = $this->request->getPathInfo();
87-
88-
// Block entire /checkout/ route (Hyva Checkout uses Magewire)
89-
if (($requestUri && stripos($requestUri, '/checkout') !== false) ||
90-
($pathInfo && stripos($pathInfo, '/checkout') !== false)) {
91-
return $invocationResult;
92-
}
93-
94-
// Block any magewire/livewire endpoints
95-
if (preg_match('/\/(magewire|livewire)\//i', (string)$requestUri)) {
86+
if ($requestUri && preg_match('/\/(magewire|livewire)\//i', $requestUri)) {
9687
return $invocationResult;
9788
}
9889

0 commit comments

Comments
 (0)