Skip to content

Commit

Permalink
Added GlobalCEFApp.TreatInsecureOriginAsSecure
Browse files Browse the repository at this point in the history
  • Loading branch information
salvadordf committed Jun 30, 2022
1 parent 63d5156 commit 6b075ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion source/uCEFApplicationCore.pas
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ interface
CEF_SUPPORTED_VERSION_RELEASE = 10;
CEF_SUPPORTED_VERSION_BUILD = 0;

CEF_CHROMEELF_VERSION_MAJOR = 101;
CEF_CHROMEELF_VERSION_MAJOR = 102;
CEF_CHROMEELF_VERSION_MINOR = 0;
CEF_CHROMEELF_VERSION_RELEASE = 5005;
CEF_CHROMEELF_VERSION_BUILD = 115;
Expand Down Expand Up @@ -189,6 +189,7 @@ TCefApplicationCore = class
FDisableComponentUpdate : boolean;
FAllowInsecureLocalhost : boolean;
FKioskPrinting : boolean;
FTreatInsecureOriginAsSecure : ustring;

// Fields used during the CEF initialization
FWindowsSandboxInfo : pointer;
Expand Down Expand Up @@ -504,6 +505,7 @@ TCefApplicationCore = class
property DisableComponentUpdate : boolean read FDisableComponentUpdate write FDisableComponentUpdate; // --disable-component-update
property AllowInsecureLocalhost : boolean read FAllowInsecureLocalhost write FAllowInsecureLocalhost; // --allow-insecure-localhost
property KioskPrinting : boolean read FKioskPrinting write SetKioskPrinting; // --kiosk-printing
property TreatInsecureOriginAsSecure : ustring read FTreatInsecureOriginAsSecure write FTreatInsecureOriginAsSecure; // --unsafely-treat-insecure-origin-as-secure

// Properties used during the CEF initialization
property WindowsSandboxInfo : Pointer read FWindowsSandboxInfo write FWindowsSandboxInfo;
Expand Down Expand Up @@ -751,6 +753,7 @@ constructor TCefApplicationCore.Create;
FDisableComponentUpdate := False;
FAllowInsecureLocalhost := False;
FKioskPrinting := False;
FTreatInsecureOriginAsSecure := '';

// Fields used during the CEF initialization
FWindowsSandboxInfo := nil;
Expand Down Expand Up @@ -2088,6 +2091,9 @@ procedure TCefApplicationCore.AddCustomCommandLineSwitches(var aKeys, aValues :
if FAllowInsecureLocalhost then
ReplaceSwitch(aKeys, aValues, '--allow-insecure-localhost');

if (length(FTreatInsecureOriginAsSecure) > 0) then
ReplaceSwitch(aKeys, aValues, '--unsafely-treat-insecure-origin-as-secure', FTreatInsecureOriginAsSecure);

// The list of features you can enable is here :
// https://chromium.googlesource.com/chromium/src/+/master/chrome/common/chrome_features.cc
// https://source.chromium.org/chromium/chromium/src/+/main:content/public/common/content_features.cc
Expand Down
2 changes: 1 addition & 1 deletion update_CEF4Delphi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
"InternalVersion" : 407,
"InternalVersion" : 408,
"Name" : "cef4delphi_lazarus.lpk",
"Version" : "102.0.10.0"
}
Expand Down

0 comments on commit 6b075ef

Please sign in to comment.