I've separated the actions for adding and modifying cookies to allow users to have a choice to either:
only add a cookie to the header if there is no cookie header or the specific cookie key is not present.
only modify a cookie in the header if it already exists.
if a user wants to be sure of both, they can simply add 2 rules: add a cookie in case it doesn't exist (rule 1) and modify a cookie if it is already present (rule 2).
I've separated the actions for adding and modifying cookies to allow users to have a choice to either:
It allows more granular control over cookies.