From 3b34d5683ee40cd3cb38d9446ebab6fcc59cb814 Mon Sep 17 00:00:00 2001 From: Eric Grange Date: Fri, 14 Apr 2023 09:27:10 +0200 Subject: [PATCH] Trim port number from URL-based domain for cookies --- uCEFBrowserThread.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uCEFBrowserThread.pas b/uCEFBrowserThread.pas index 255d12b..a9f3500 100644 --- a/uCEFBrowserThread.pas +++ b/uCEFBrowserThread.pas @@ -706,6 +706,9 @@ procedure TCEFBrowserThread.SetCookies; if domain = '' then begin var p := Pos('//', url); domain := Copy(url, p+2, Pos('/', url, p+2)-p-2); + p := Pos(':', domain); + if p > 0 then + SetLength(domain, p-1); end; var path := fields.Values['path'];