Skip to content

Commit

Permalink
ColdBox Proxy path fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
elpete committed Dec 4, 2024
1 parent 238f669 commit a9dc62d
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions system/remote/ColdboxProxy.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,12 @@ component serializable="false" accessors="true" {
}

// Find the path of the proxy component being called
var contextRoot = getContextRoot();
var componentPath = replaceNoCase(
mid(
scriptName,
len( contextRoot ) + 2,
len( scriptName ) - len( contextRoot ) - 5
),
"/",
".",
"all"
);
// replace the context root at the beginning of the script
var componentPath = replaceNoCase( scriptName, getContextRoot(), "", "one" );
// remove the extension, if any
componentPath = reReplaceNoCase( componentPath, "\..+$", "", "one" );
// replace all slashes with dots
componentPath = reReplaceNoCase( componentPath, "\/+", ".", "all" );

var injector = getWirebox();
var binder = injector.getBinder();
Expand Down

0 comments on commit a9dc62d

Please sign in to comment.