Layer7 API Management

 View Only
  • 1.  How to delete all cookies from request

    Posted Jun 02, 2021 10:25 AM
    Hi Team,

    we have a requirement to delete all cookies from request  before routing to back end .
    Note : we dont know the cookie name, it will be different for each request.

    --Uday


  • 2.  RE: How to delete all cookies from request

    Broadcom Employee
    Posted Jun 02, 2021 08:21 PM
    The cookie is in request header, just use header assertion to remove the cookie header,
    https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/10-0/policy-assertions/assertion-palette/message-routing-assertions/manage-transport-properties-headers-assertion.html

    Regards,
    Mark


  • 3.  RE: How to delete all cookies from request

    Posted Jun 03, 2021 03:01 AM
    HI,
    Than you for reply.
    the remove header assertion will work when we know the header name of the cookies, but this case we dont' know the header name of the cookies and the name will be dynamic.

    --Uday


  • 4.  RE: How to delete all cookies from request
    Best Answer

    Posted Jun 03, 2021 05:04 AM
    ${request.http.cookienames}
    or 
    ${response.http.cookienames}
    to get all the cookies the recursively use run each assertion and update/delete the cookies 


    ------------------------------
    Pre-Sales Consultant
    CA Southern Africa
    ------------------------------



  • 5.  RE: How to delete all cookies from request

    Broadcom Employee
    Posted Jun 03, 2021 10:23 AM
    An alternative approach which would be simpler, would be to create a new message context variable with the request.mainpart as the body to use to route to the backend. 

    Barry


  • 6.  RE: How to delete all cookies from request

    Broadcom Employee
    Posted Jun 03, 2021 09:03 PM
    Dear Uday,
    The header name is cookie.
    All the cookies are in the value of header cookie.

    Regards,
    Mark