itsgoingd / clockwork

Clockwork - php dev tools in your browser - server-side component
https://underground.works/clockwork
MIT License
5.69k stars 321 forks source link

Add Ability to Configure Local Domains in Clockwork Settings #699

Open bizon-dot opened 7 months ago

bizon-dot commented 7 months ago

Hello Team,

This pull request addresses a limitation in Clockwork where the domains considered as ‘local’ were hard-coded. This enhancement introduces configurable local domains, allowing Clockwork to be more adaptable to various development environments.

Problem:

Previously, the domains that Clockwork recognized as local were fixed, making it less flexible for developers working with different or multiple domains during local development.

Solution:

I've introduced a local_domains configuration array in the Clockwork configuration file. Developers can now specify which domains should be considered local by editing this array. If local_domains is not defined, Clockwork will default to the original hardcoded array.

Changes Made:

itsgoingd commented 1 month ago

Hey, thanks for the pull request, but I'm not sure if these need to be configurable. If you want to use Clockwork on a non-default local domain, you can always explicitly enable it with CLOCKWORK_ENABLE=true. Or am I missing some use-case?