CBWIRE provides extensive configuration options to customize its behavior for your application needs. You can override the default settings by adding configuration in your ColdBox application's config/ColdBox.bx for BoxLang or config/ColdBox.cfc for CFML.
All CBWIRE configuration is placed within the moduleSettings struct under the cbwire key. Here's a complete example showing all available configuration options with their default values:
Controls whether CBWIRE automatically includes its CSS and JavaScript assets in your pages. When enabled, you don't need to manually add wireStyles() in your layout's <head> or wireScripts() before the closing </body> tag.
Default:true
When disabled, you'll need to manually include the assets in your layout:
moduleRootURL
Specifies the root URL path for CBWIRE module assets and endpoints. Useful when your application is deployed in a subdirectory or when using custom URL mappings.
Default:/modules/cbwire
Setting autoInjectAssets to false is useful when you want more control over when and how CBWIRE assets are loaded, or when implementing custom asset optimization strategies.
Component Configuration
wiresLocation
Defines the directory where your CBWIRE components are stored, relative to your application root. This affects component auto-discovery and naming conventions.
Default:wires
trimStringValues
When enabled, automatically trims whitespace from string values in component data properties during updates. This is particularly useful for form inputs where users might accidentally include leading or trailing spaces.
Default:false
You can also enable this setting on individual components:
Changing the wiresLocation after components have been created will require updating your component references and possibly your routing configuration.
throwOnMissingSetterMethod
Controls whether CBWIRE throws an exception when trying to set a property that doesn't have a corresponding setter method. When disabled, missing setters are silently ignored.
Default:false
Request Handling
updateEndpoint
Sets the URI endpoint where CBWIRE processes component updates and actions. You may need to modify this if URL rewriting is disabled or if you're using custom routing.
Default:/cbwire/updates
maxUploadSeconds
Specifies the maximum time (in seconds) allowed for file upload operations to complete. This prevents long-running uploads from consuming server resources indefinitely.
Default:300 (5 minutes)
When URL rewriting is disabled, remember to include /index.cfm in your updateEndpoint configuration.
UI Features
showProgressBar
Controls whether a progress bar appears at the top of the page during wire:navigate operations. The progress bar provides visual feedback during page transitions.
Default:true
progressBarColor
Customizes the color of the progress bar displayed during wire:navigate operations. Accepts any valid CSS color value.
Default:#2299dd
The progress bar only appears when using wire:navigate for page transitions. Standard CBWIRE component updates don't trigger the progress bar.
Security Configuration
checksumValidation
Enables or disables checksum validation for component payloads. This security feature validates the integrity of data sent between the client and server to prevent tampering.
Default:true
We recommend always leaving checksum validation enabled for security, but you can disable it as needed for debugging or specific use cases.
All configuration options are optional. CBWIRE will use sensible defaults if no custom configuration is provided.