clockwork icon indicating copy to clipboard operation
clockwork copied to clipboard

Add Ability to Configure Local Domains in Clockwork Settings

Open bizon-dot opened this issue 1 year ago • 1 comments

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:

  • Added a new local_domains array to the Clockwork configuration file.
  • Modified the hasLocalHost() function to utilize the local_domains array instead of the previously hard-coded values.

bizon-dot avatar Apr 20 '24 06:04 bizon-dot

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?

itsgoingd avatar Oct 18 '24 00:10 itsgoingd