Time to upgrade! You only have until October 31, 2019 to move to Dynatrace, our all-in-one software intelligence platform. For details, see the Synthetic Upgrade Center and Dynatrace Synthetic documentation.

Map the HOST origin

In addition to setting the Host Mapping section of a script, Akamai scripts frequently need an event hook to properly set the Host Origin for each request being made. The code below is the event hook that is needed.

In the example, replace the outlet.lenovo.com entries with whatever host you are trying to map.

var findHTTP = new AddEventHookCommand({
"eventType": "sendingRequest",
"name": "getHTTP",
"handler":"if(request.url.indexOf('outlet.lenovo.com') != -1){alert(request.url);request.replaceHeader('Host', 'outlet.lenovo.com');}"
});

findHTTP.execute();