Available inall subroutines.

Returns a value associated with the cookie_name in the Set-Cookie header contained in the HTTP response indicated by where. An unset value is returned if a cookie is not found or on error. In the vcl_fetch method, the beresp response is available. In vcl_deliver and vcl_log, the resp response is available.

If multiple cookies of the same name are present in the response, the value of the last one will be returned.

When this function does not have enough memory to succeed, the request is failed.

This function conforms to RFC 6265.


set resp.http.MyValue = setcookie.get_value_by_name(resp, "myvalue");

User contributed notes


Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)