Wkwebview cookies not visible in $_COOKIE

Viewed 17

I've

@IBOutlet var KronosWebsite: WKWebView!

and I do

let cookie = HTTPCookie(properties: [
    .domain: "*.kronos-sport.com",
    .path: "/",
    .name: "hasConsent",
    .value: "true",
    .secure: "true",
    .expires: NSDate(timeIntervalSinceNow: 365 * 24 * 60 * 60)
])
                    
DispatchQueue.main.async {
  self.KronosWebsite.configuration.websiteDataStore.httpCookieStore.setCookie(cookie!)
}

and in php I don't see this cookie when i dump $_COOKIE

So, do I need to do something special to make WkWebview cookie visible in php code of page called in the WkWebview?

1 Answers

The issue was the domain, the "*" was unnecessary

Related