API Gateway: Unable to return custom headers when using a 'Return Template Response to Requestor' assertion

book

Article ID: 16586

calendar_today

Updated On:

Products

STARTER PACK-7 CA Rapid App Security CA API Gateway

Issue/Introduction

When using a 'Return Template Response to Requestor' Assertion you are not able to add additional Header information to the response.



How can custom headers be added to the response when using a 'Return Template Response to Requestor' assertion? 


Headers2.png

Environment

This issue may occur in all versions of Gateway from 8.3 and above

Resolution

Custom headers can be added using the 'Manage Transport Properties' assertion. In this example we have put in the Name as "pmf" and Value as "TOMBRADY"



The most common reasons the headers would not be returned are:

 

1) The wrong target message has been chosen. Ensure the assertion is using the target as the response object.

2) The 'send immediately' check box is selected in the requested template response assertion. When this is selected the response headers will be ignored. You will need to remove the check box to add the custom headers.



Attachments