CBWIRE
v4.x
v4.x
  • Introduction
  • How It Works
  • Getting Started
  • Configuration
  • Releases
    • What's New With 4.1
    • What's New With 4.0
    • What's New With 3.2
    • What's New With 3.1
    • What's New With 3.0
    • What's New With 2.2
    • What's New With 2.1
    • What's New With 2.0
  • Resources
  • Upgrading from CBWIRE 3.x
  • Upgrading from CBWIRE 2.x
  • CBWIRE CLI
  • The Essentials
    • Components
    • Templates
    • Data Properties
    • Computed Properties
    • Data Binding
    • Actions
    • Events
    • Nesting Components
    • Lifecycle Methods
    • JavaScript
    • Testing
  • Features
    • Single-file Components
    • Alpine.js
    • Lazy Loading
    • Form Validation
    • File Uploads
    • Query String
    • Redirecting
    • WireBox
  • Template Directives
    • wire:click
    • wire:confirm
    • wire:dirty
    • wire:ignore
    • wire:init
    • wire:key
    • wire:loading
    • wire:model
    • wire:navigate
    • wire:offline
    • wire:poll
    • wire:stream
    • wire:submit
    • wire:transition
  • Advanced
    • Troubleshooting
Powered by GitBook
On this page
  • Overview
  • autoInjectAssets
  • maxUploadSeconds
  • trimStringValues
  • wiresLocation
  • updateEndpoint
  • showProgressBar
  • progressBarColor
  • csrfEnabled
  • csrfStorage
  • moduleRootURL

Was this helpful?

Export as PDF

Configuration

Overview

You can alter CBWIRE and Livewire's default behavior by overriding settings in your config/ColdBox.cfc file.

// ./config/ColdBox.cfc
component{
    function configure() {
        moduleSettings = {
            "cbwire" = {
                "autoInjectAssets": false,
                "maxUploadSeconds": 5 * 60, // 5 minutes
                "throwOnMissingSetterMethod" : false,
                "trimStringValues": false,
                "wiresLocation": "wires",
                "updateEndpoint": "/cbwire/updates",
                "showProgressBar": true,
                "progressBarColor": "##2299dd",
                "csrfEnabled": false,
                "csrfStorage": "SessionStorage@cbstorages",
                "moduleRootURL": "/modules/cbwire"
            }
        };
     }
}

Overriding the module settings is optional.

autoInjectAssets

Automatically include Livewire's CSS and JavaScript assets. This removes the need to manually add references to wireStyles() in your <head> and wireScripts() at the end of </body> in your ColdBox layout file. Defaults to true.

maxUploadSeconds

The maximum amount of time allowed for uploads to complete.

trimStringValues

component extends="cbwire.models.Component" {
    trimStringValues = true;
    data = {
        "name": ""  
    };
}

wiresLocation

updateEndpoint

Sets the URI endpoint where CBWIRE posts its updates to the server. You might need to change this if you do not have URL rewriting enabled.

{
    "updateEndpoint": "/index.cfm/cbwire/update"
}

showProgressBar

progressBarColor

csrfEnabled

Determines if CSRF token protection is enabled or not. Defaults to false. This will be changed to 'true' in CBWIRE 5.

csrfStorage

CBWIRE uses CSRF tokens to protect incoming requests from bad actors. You can set the wirebox mapping to determine what storage provider is used when storing the CSRF tokens. Defaults to SessionStorage@cbstorages.

moduleRootURL

Override to change the URL root path to CBWIRE.

PreviousGetting StartedNextReleases

Last updated 2 months ago

Was this helpful?

When set to true, any that contain strings will be automatically trimmed on updates. Great for form inputs. Defaults to false.

You can enable it directly on your if you don't want to set this globally.

The relative folder path where are stored. Defaults to 'wires'.

When set to true, it displays a progress bar at the top of the page using to load pages. Defaults to true. Set to false to disable the progress bar altogether.

Use to adjust the progress bar color when using .

data properties
components
components
wire:navigate
wire:navigate