|
53 | 53 | </cfif>
|
54 | 54 | </cfif>
|
55 | 55 | <cfif !isUnhandledPathRequest(arguments.targetPath)>
|
56 |
| - <!--- if browsing to root of api, redirect to dashboard ---> |
57 |
| - <cfif NOT application._taffy.settings.disableDashboard AND NOT structKeyExists(url,application._taffy.settings.endpointURLParam) AND NOT structKeyExists(form,application._taffy.settings.endpointURLParam) AND len(cgi.path_info) lte 1 and len(cgi.query_string) eq 0 and listLast(cgi.script_name, "/") eq "index.cfm"> |
58 |
| - <cfset local.basePath = listDeleteAt(cgi.script_name,listLen(cgi.script_name,"/"),"/") /> |
59 |
| - <cflocation url="#local.basePath#/?#application._taffy.settings.dashboardKey#" addtoken="false" /> |
| 56 | + <!--- if browsing to root of api, show dashboard ---> |
| 57 | + <cfif |
| 58 | + NOT structKeyExists(url,application._taffy.settings.endpointURLParam) |
| 59 | + AND NOT structKeyExists(form,application._taffy.settings.endpointURLParam) |
| 60 | + AND len(cgi.path_info) lte 1 |
| 61 | + AND listLast(cgi.script_name, "/") eq "index.cfm"> |
| 62 | + <cfif NOT application._taffy.settings.disableDashboard> |
| 63 | + <cfset requestStartEvent() /> |
| 64 | + <cfinclude template="dashboard.cfm" /> |
| 65 | + <cfabort /> |
| 66 | + <cfelse> |
| 67 | + <cfif len(application._taffy.settings.disabledDashboardRedirect)> |
| 68 | + <cflocation url="#application._taffy.settings.disabledDashboardRedirect#" addtoken="false" /> |
| 69 | + <cfabort /> |
| 70 | + <cfelse> |
| 71 | + <cfset throwError(403, "Forbidden") /> |
| 72 | + </cfif> |
| 73 | + </cfif> |
60 | 74 | </cfif>
|
61 | 75 | <cfelse>
|
62 | 76 | <!--- allow pass-thru for selected paths --->
|
|
300 | 314 | <cfset local.defaultConfig.representationClass = "taffy.core.nativeJsonRepresentation" />
|
301 | 315 | <cfset local.defaultConfig.dashboardKey = "dashboard" />
|
302 | 316 | <cfset local.defaultConfig.disableDashboard = false />
|
| 317 | + <cfset local.defaultConfig.disabledDashboardRedirect = "" /> |
303 | 318 | <cfset local.defaultConfig.unhandledPaths = "/flex2gateway" />
|
304 | 319 | <cfset local.defaultConfig.allowCrossDomain = false />
|
305 | 320 | <cfset local.defaultConfig.useEtags = false />
|
|
0 commit comments