DataScript: avi.http.remove_cookie_attribute
DataScript
Function | avi.http.remove_cookie_attribute([name],[cookie_attribute1], [cookie_attribute2],..) |
Description | This function removes the existing cookie attributes value in the HTTP response.
|
Event | HTTP_RESP |
Parameters | The parameters are as follows:Name :The name of the cookie to be modified.attr :The attribute of the specified which has to be removed.The attributes can be: path , domain , expires, maxage , httponly , secure , samesite |
Returns | None |
Example | Example 1: Assume the server is sending a simple cookie with the name, path, and Domain server cookie example: Set-Cookie: cookie_name=value; path=/dummy; Domain=www.avinetworks2.com
To remove the path attribute, use
Set-cookie will be modified to Set-Cookie: cookie_name=value; Domain=www.avinetworks2.com Example 2: Consider scenarios like, request comes with path as /dummy1 then to remove the requested path from set-cookie, use server cookie example: Set-Cookie: name=value; path=/dummy1; Domain=www.avinetworks2.com If request comes with path = /dummy1 then remove path attribute from set-cookie
|