Skip to content

Commit

Permalink
Add support for URL rewriting in tool specifications
Browse files Browse the repository at this point in the history
  • Loading branch information
szschaler authored Jan 12, 2024
1 parent 36dc76f commit df410eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion platform/src/ToolsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ class ToolManager {
}

if (xhr.status === 200) {
// Rewrite URLs in tool config
let baseURL = toolUrl.url.substring(0, toolUrl.url.lastIndexOf("/")); // remove the name of the json file (including the trailing slash)
let toolConfig = xhr.responseText.replaceAll("{{BASE-URL}}", baseURL);

let validatedConfig = this.parseAndValidateToolConfig(xhr.responseText);
// Now parse tool config
let validatedConfig = this.parseAndValidateToolConfig(toolConfig);

if ( validatedConfig.errors.length == 0 ){

Expand Down

0 comments on commit df410eb

Please sign in to comment.