You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to load the Debugbar from a sub domain because that's where my Laravel instance is running and my system on my top-level domain is querying Laravel via Guzzle. Maybe it sound kinda weird but that's how it is.
I set the route_domain parameter in the debugbar.php and cleared & cached the config for Laravel. After reloading my system I saw that the injected HTML still tries to load the debugbar assets from my top level domain.
So I did some testing and debugging and found out that the Regex used in these lines in the JavascriptRenderer.php is removing the domain completely, resulting in $cssRoute only be filled with /_debugbar/assets/[...] and NOT including the route_domain given via the config file:
I did a quick test, setting some.domain as the route_domain parameter. Then I did some tinkering in the JavascriptRenderer with the old regex and watched Xdebug while refreshing my system. These are the results:
I also did some tests with regex101.com
Current regex
Old regex (don't know when this was changed)
As you can see the current used regex matches the whole domain and therefor the preg_replace will remove it entirely from the string.
I don't think this is intended behavior and it would be cool if you guys could take a look at this.
Greetings
The text was updated successfully, but these errors were encountered:
Hi there
I need to load the Debugbar from a sub domain because that's where my Laravel instance is running and my system on my top-level domain is querying Laravel via Guzzle. Maybe it sound kinda weird but that's how it is.
I set the
route_domain
parameter in the debugbar.php and cleared & cached the config for Laravel. After reloading my system I saw that the injected HTML still tries to load the debugbar assets from my top level domain.So I did some testing and debugging and found out that the Regex used in these lines in the
JavascriptRenderer.php
is removing the domain completely, resulting in$cssRoute
only be filled with/_debugbar/assets/[...]
and NOT including the route_domain given via the config file:laravel-debugbar/src/JavascriptRenderer.php
Line 52 in bd8edca
laravel-debugbar/src/JavascriptRenderer.php
Line 57 in bd8edca
Tests & Debugging
I did a quick test, setting
some.domain
as theroute_domain
parameter. Then I did some tinkering in the JavascriptRenderer with the old regex and watched Xdebug while refreshing my system. These are the results:I also did some tests with regex101.com
Current regex
Old regex (don't know when this was changed)
As you can see the current used regex matches the whole domain and therefor the
preg_replace
will remove it entirely from the string.I don't think this is intended behavior and it would be cool if you guys could take a look at this.
Greetings
The text was updated successfully, but these errors were encountered: