6. Misc

setCookies

Adds one or more Set-Cookie headers to the HTTP response for session handling, user preferences, or tracking purposes. Supports computing expiry, setting standard attributes like Domain and Path, and building a compliant cookie string. Useful for enriching responses with configurable cookies directly at gateway level without backend involvement.

Can be used in:

serviceProxy, api, global, chainDef, for, stompProxy, if, registration, wsStompReassembler, internal, interceptor, chain, bean, transport and soapProxy

Sample

<api port="2000">
  <response>
    <setCookies>
      <cookie name="SESSION" value="akj34"/>
    </setCookies>
  </response>
  <return/>
</api>
    
API on port 2000 that issues a SESSION cookie with value akj34 in the response

Child Elements

ElementsDescriptionCardinality
cookie Registers the list of child elements. 0..*