cakephp / debug_kit

Debug Toolbar for CakePHP applications.
http://cakephp.org
Other
853 stars 573 forks source link

DebugKit.safeTld complaining about full domains #1007

Open boindil opened 3 months ago

boindil commented 3 months ago

Hi,

I've just installed cakephp in version 5.0 fresh - however I've notices, that the setting DebugKit.safeTld doesnt seem to accept full domains. For us this doesnt make any sense since we dont have a local dev environment with such a domain.

Why not just accept a simple domain (e.g. testenv.cakephp.com)? I guess it would be pretty easy to implement and I dont see why only the actual last portion should be matched against ...

dereuromark commented 3 months ago

Feel free to make a PR with suggested changes

ADmad commented 1 month ago

forEnable accepts a callable, so you can use 'forceEnable' => fn () => env('HTTP_HOST') === 'mydomain.com' to match a specific domain.