I am trying to coordinate cookies that were set by setcookie in PHP with cookie in Rails. The problem is when I set the cookie to localhost domain in PHP with COOKIE_DOMAIN false it sets it to domain 127.0.0.1. However Rails settings to localhost domain instead of 127.0.0.1 domain uses localhost. Therefore I have two different domains (127.0.0.1 and localhost) to localhost domain. How can I fix it, to set the cookie explicitly to localhost domain with setcookie.
Thanks!
The cookie’s domain depends on the current domain when the cookie is set. Make sure both your applications are pointing to
localhost– then it should work.