-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathModuleConfig.cfc
More file actions
119 lines (113 loc) · 4.34 KB
/
ModuleConfig.cfc
File metadata and controls
119 lines (113 loc) · 4.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
component {
this.name = "cbwire";
this.version = "@build.version@+@build.number@";
this.author = "Ortus Solutions";
this.webUrl = "https://github.com/coldbox-modules/cbwire";
this.dependencies = [ "cbstorages" ];
this.entryPoint = "cbwire";
this.layoutParentLookup = false;
this.viewParentLookup = false;
this.cfmapping = "cbwire";
this.modelNamespace = "cbwire";
this.applicationHelper = [ "helpers/helpers.cfm" ];
function configure(){
settings = {
/**
* Set to true to automatically include CSS and JS
* assets for CBWIRE. This makes it where you do not
* need to add wireStyles() and wireScripts() to your layout.
*/
"autoInjectAssets": true,
/**
* Capture our module root for use throughout CBWIRE.
*/
"moduleRootPath": getCanonicalPath( getCurrentTemplatePath().replaceNoCase( "/ModuleConfig.cfc", "", "one" ) ),
/**
* The default storage path for file uploads.
* Uses the system temporary directory for security.
*/
"uploadsStoragePath": getCanonicalPath( getTempDirectory() & "/cbwire" ),
/**
* The default storage path for single-file component compilation.
* This must be in the module directory for WireBox to instantiate components.
*/
"storagePath": getCanonicalPath( getCurrentTemplatePath().replaceNoCase( "/ModuleConfig.cfc", "", "one" ) & "/models/tmp" ),
/**
* The URL to the module root. The sometimes needs to be overridden for certain server configurations.
*/
"moduleRootURL": "/modules/cbwire",
/**
* The default folder name where your cbwire components are stored.
* Defaults to 'wires' folder.
*/
"wiresLocation" : "wires",
/**
* Trims string properties if set to true
*/
"trimStringValues" : false,
/**
* Enables or disables the progress bar when using wire:navigate
*/
"showProgressBar": true,
/**
* The color of the progress bar when using wire:navigate
*/
"progressBarColor": "##2299dd",
/**
* Enables or disables checksum validation for component payloads.
* We recommend always leaving this enabled, but you can disable it
* as needed.
*/
"checksumValidation": true,
/**
* Enables Cross-Site Request Forgery (CSRF) protection for CBWIRE requests.
* When enabled, all component actions require a valid CSRF token.
* When disabled, checksum validation still provides security against tampering.
*/
"csrfEnabled": true,
/**
* Specifies the WireBox mapping for the CSRF token storage service.
* The service must implement the ICSRFStorage interface.
*
* Built-in options:
* - "SessionCSRFStorage@cbwire" (default) - Session-based storage, OWASP recommended
* - "CacheCSRFStorage@cbwire" - Cache-based storage for distributed/clustered systems
*
* You can also provide your own custom implementation that implements
* cbwire.models.interfaces.ICSRFStorage
*/
"csrfService": "SessionCSRFStorage@cbwire"
};
routes = [
{
"pattern" : "preview-file/:uploadUUID",
"handler" : "Main",
"action" : "previewFile"
},
{
"pattern" : "upload",
"handler" : "Main",
"action" : "uploadFile"
},
{
"pattern" : "update",
"handler" : "Main",
"action": "index"
}
];
interceptors = [
// Init
{ class : "#moduleMapping#.interceptors.CBWIRE" }
];
interceptorSettings = {
customInterceptionPoints : [
"onCBWIREMount",
"preCBWIRERender",
"onCBWIRERender",
"preCBWIREUpdate",
"onCBWIREUpdate",
"onCBWIRESecureFail"
]
};
}
}