By default, the JavaScript Agent chooses the same transport (protocol) used to load the base page, but you can configure the JavaScript Agent to use HTTPS for a more secure network connection.

When configured to use HTTPS, the JavaScript Agent will use HTTPS to do the following: 

  • fetch adrum-ext.js
  • fetch geolocation data

Starting with JavaScript Agent >= 22.4.0, the useHTTPSAlways flag only applies to fetching adrum-ext.js and geolocation data. CORS and image beacons by default will be sent to an HTTPS endpoint if available. If HTTPS is not available, beacons then will be sent with the host HTTP endpoint.

Set the useHTTPSAlways Flag

Following the code example below, you can set the boolean useHTTPSAlways to true to configure the JavaScript Agent to always use HTTPS.

<head>
    <script type='text/javascript' charset='UTF-8'>
        (function(cfg) { 
            cfg.useHTTPSAlways = true;
        })(window['adrum-config'] || (window['adrum-config'] = {}));
    </script>
    <script src='https://cdn.appdynamics.com/adrum/adrum-latest.js' type='text/javascript' charset='UTF-8'></script>
    ...
</head>
JS