License Type | SaaS & On-Premise |
Agent Mode | Assess & Protect |
Main Product Category | Node.js Agent |
Sub Category | Configuration |
Question
How is the application URL set by the Contrast Node Agent?
Answer
The Node Agent will first check if the following configuration is set to a directory containing the applications package.json
:
agent.node.app_root
If this is not set or the location doesn't contain a package.json
file, then it will use the directory the applications <app-main>.js
script is in.
You will see entries like the following in the Node Agent log on start up:
contrast:appInfo - finding package.json for /juice-shop/app.js
...
contrast:appInfo - using package.json at /juice-shop/package.json
In the Contrast UI you'll see the package.json location referenced under the application URL: