Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

adding unsafely-treat-insecure-origin-as-secure

Post Reply
czar
Posts: 4
Joined: Thu Jan 27, 2022 3:47 am

adding unsafely-treat-insecure-origin-as-secure

Post by czar »

We are using a a kiosk on a LAN and running into some issues when we wish to take a screen shot as part of a "support/bug" function.

The issue is when we use getDisplayMedia

I just don't know how to add the following flag into CEF

--unsafely-treat-insecure-origin-as-secure="http://192.168.0.50"

I will keep looking but I can't figure out at the moment - any help would be appreciated
User avatar
salvadordf
Posts: 4580
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: adding unsafely-treat-insecure-origin-as-secure

Post by salvadordf »

Hi,

I just uploaded a new CEF4Delphi version to Github with a GlobalCEFApp.TreatInsecureOriginAsSecure property.

Add this code line before the GlobalCEFApp.StartMainProcess call in the DPR file :

Code: Select all

GlobalCEFApp.TreatInsecureOriginAsSecure := 'http://192.168.0.50';
If you need to add more command line switches use GlobalCEFApp.AddCustomCommandLine like this :

Code: Select all

GlobalCEFApp.AddCustomCommandLine('--my-switch');
In the case the switch has a key-value pair then use it like this :

Code: Select all

GlobalCEFApp.AddCustomCommandLine('--my-switch', 'myvalue');
The last example will add --my-switch=myvalue to Chromium.
czar
Posts: 4
Joined: Thu Jan 27, 2022 3:47 am

Re: adding unsafely-treat-insecure-origin-as-secure

Post by czar »

Thanks for the information a very good response, very clear and helpful.

I have now updated my project to use the latest CEF. I haven't quite solved my problem but I am on the way.
Post Reply