How can I avoid double injection of the JavaScript tag with Adobe Dispatcher?

When using Adobe Dispatcher with a webserver monitored by Dynatrace OneAgent, the dispatcher should be configured to cache the response header X-OneAgent-JS-Injection next to the cached files. Otherwise, the JavaScript tag will be injected twice into the HTML page. This means that the JavaScript tag will be executed twice at the browser, producing unnecessary load (e.g. the beacons will be sent twice, etc.).

To avoid double injection of the JavaScript tag when using Adobe Dispatcher, add X-OneAgent-JS-Injection to the headers section of the Adobe Dispatcher configuration:

/headers
{
    "X-OneAgent-JS-Injection"
}