-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApplication.cfc
45 lines (34 loc) · 1.05 KB
/
Application.cfc
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
component extends="core.corfield.framework" {
include "core/config/settings.cfm";
// APPLICATION SETTINGS
// DON'T TOUCH IT! USE SETTINGS.CFM UNDER CONFIG TO DO SO
this.name = variables.settings.global.applicationname;
this.sessionManagement = true;
this.sessionTimeout = variables.settings.global.sessionTimeout;
// ------------------------------------------------------
include "core/config/fw1_settings.cfm";
function setupApplication() {
application.settings = variables.settings;
}
function setupSession() {
controller('security.setSession');
}
function getEnvironment() {
var hostname = getHostname();
if(findNocase("local",CGI.SERVER_NAME))
return "dev";
else
return "prod";
}
function before() {
request.context.starttime = getTickCount();
}
function setupRequest() {
controller('security.authorize');
request.context.settings = application.settings;
}
function setupResponse() {
var responsetime = getTickCount()-rc.starttime;
writelog("responsetime=#responsetime#","info",true);
}
}