KB Article #178805

Using a different hostname in the HTTP Via header

Problem

You want to use an alias instead of the actual hostname in the HTTP Via header, but the gateway doesn't allow you to modify the Via header in policy.

Resolution

You can use an alternative hostname that's resolvable to a valid IP address in the SystemSetting tag of the instance's XML configuration, e.g. <install>/groups/group-2/instance-1/conf/service.xml -



<?xml version="1.0" encoding="UTF-8"?>
<NetService provider="NetService">
...
<SystemSettings tracelevel="INFO" secret="${secret}"
...
hostname="example_host"/>
...
</NetService>


Where the example_host hostname can be an entry in the hosts file. There is no need to change the actual hostname of the box. Then the Via header will then be generated as:


Via:1.1 example_host (Gateway)


instead of


Via:1.1 host1.axway.int (Gateway)


Note that the value shown in parentheses here is the Server Brand setting, which you can find in Policy Studio under General Settings, near the bottom of the list under the Trace Level. It defaults to a blank value in current versions. It is an optional identifier which you can set to whatever you like.