Updated HeaderUtil::setCookie method to skip domain parameter if domain is IP address

Cookies were failing in our local dev set up due to the domain being set improperly, this change addresses these corner cases while maintaining the original functionality.