- Code: Select all
CefRefPtr<CefCookieManager> manager = mContextHandler->GetCookieManager();
CefString url = "https://my.example.com";
CefCookie cookie;
CefString(&cookie.name) = "cookie_name";
CefString(&cookie.value) = "cookie_value";
CefString(&cookie.domain) = "id.example.com";
CefString(&cookie.path) = "/";
cookie.httponly = false;
cookie.secure = true;
cookie.has_expires = false;
bool result = manager->SetCookie(url, cookie, nullptr);
It no longer works and nothing in my code has changed.
The result of setCookie(...) returns true but the cookie never appears in the cookie store. (Using sqlite3 to check).
If I change the domain parameter to "example.com" the cookie is appears.
The values are are all set to my code via a response from a REST call- I don't get to choose them myself - is the value I am getting for domain wrong or is there something else I need to do?