Synthetic Classic has reached end of support and is no longer available. Existing Synthetic Classic customers have been upgraded to the all-in-one Dynatrace software intelligence platform.

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 entries with whatever host you are trying to map.

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