From a8f2cd9bbf2f12144f5dced97beb3347350a64c8 Mon Sep 17 00:00:00 2001 From: salvadordf Date: Sun, 12 Mar 2023 20:14:43 +0100 Subject: [PATCH] Added GlobalCEFApp.RemoteAllowOrigins --- source/uCEFApplicationCore.pas | 6 ++++++ update_CEF4Delphi.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/uCEFApplicationCore.pas b/source/uCEFApplicationCore.pas index 0e5d059f..abbcbe47 100644 --- a/source/uCEFApplicationCore.pas +++ b/source/uCEFApplicationCore.pas @@ -194,6 +194,7 @@ type FNetLogEnabled : boolean; FNetLogFile : ustring; FNetLogCaptureMode : TCefNetLogCaptureMode; + FRemoteAllowOrigins : ustring; // Fields used during the CEF initialization @@ -523,6 +524,7 @@ type property NetLogEnabled : boolean read FNetLogEnabled write FNetLogEnabled; // --log-net-log property NetLogFile : ustring read FNetLogFile write FNetLogFile; // --log-net-log property NetLogCaptureMode : TCefNetLogCaptureMode read FNetLogCaptureMode write FNetLogCaptureMode; // --net-log-capture-mode + property RemoteAllowOrigins : ustring read FRemoteAllowOrigins write FRemoteAllowOrigins; // --remote-allow-origins // Properties used during the CEF initialization property WindowsSandboxInfo : Pointer read FWindowsSandboxInfo write FWindowsSandboxInfo; @@ -779,6 +781,7 @@ begin FNetLogEnabled := False; FNetLogFile := ''; FNetLogCaptureMode := nlcmDefault; + FRemoteAllowOrigins := ''; // Fields used during the CEF initialization FWindowsSandboxInfo := nil; @@ -2134,6 +2137,9 @@ begin if (length(FTreatInsecureOriginAsSecure) > 0) then ReplaceSwitch(aKeys, aValues, '--unsafely-treat-insecure-origin-as-secure', FTreatInsecureOriginAsSecure); + if (length(FRemoteAllowOrigins) > 0) then + ReplaceSwitch(aKeys, aValues, '--remote-allow-origins', FRemoteAllowOrigins); + if FNetLogEnabled then begin ReplaceSwitch(aKeys, aValues, '--log-net-log', FNetLogFile); diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index efd599a3..8f6f57bf 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,7 +2,7 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 472, + "InternalVersion" : 473, "Name" : "cef4delphi_lazarus.lpk", "Version" : "111.2.2" }