Changing the Server Header in responses in API Gateway
searchcancel
Changing the Server Header in responses in API Gateway
book
Article ID: 42850
calendar_today
Updated On: 01-20-2025
Products
CA API Gateway
Issue/Introduction
In some cases, it may be desirable to change the server header value seen when viewing HTTP response headers sent from the API Gateway. This is sometimes changed for security reasons.
Environment
Applies to all versions of the API Gateway.
Resolution
This can be changed in several ways.
Make the change at the listen port level
Open Policy Manager using an administrator account.
Select Manage Listen Ports from the Task menu of the Policy Manager.
Select the Advanced Tab.
Under the Advanced Properties click Add.
For Property Name add server and then enter the desired Value. In most cases, users will choose to nullify it by removing all text from the Value field.
The Property Name ofservermust be in lower-case as it is case-sensitive. Not following the case-sensitivity means it may be overwritten.
Click OK then OK again to enable this setting.
Once the above is complete, the change will take effect within a few seconds for all new connections to the Gateway on this port. It may cause a momentary pause to traffic while this is occurring
2. Make the change for all listen ports ( This only works for GW 9.4 and above )
SSH to the gateway and edit /opt/SecureSpan/Gateway/node/default/etc/conf/system.properties
Add the line: com.l7tech.server.response.header.server=NEWVALUE where NEWVALUE is the value you wish to have returned
Note: the value can be anything except a blank value
Additional Information
Tested on Gateway 10.1 CR3
The server value shows as a change in the browser debugger, however, you may still see it in the Policy Manager service debugger as “Layer7-API-Gateway”