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.
begin
ChromiumWindow1.ChromiumBrowser.ProxyType:=3;
ChromiumWindow1.ChromiumBrowser.ProxyServer:=sEdit1.Text;
ChromiumWindow1.ChromiumBrowser.ProxyPort:=StrToInt(Edit1.Text);
ChromiumWindow1.ChromiumBrowser.ProxyUsername:=Edit2.Text;
ChromiumWindow1.ChromiumBrowser.ProxyPassword:=Edit3.Text;
// This also does not work right away.
// ChromiumWindow1.ChromiumBrowser.CustomHeaderName:='Cookie';
// ChromiumWindow1.ChromiumBrowser.CustomHeaderValue:='test=1;';
ChromiumWindow1.ChromiumBrowser.OnBeforeResourceLoad:=OnBeforeResourceLoad;
ChromiumWindow1.LoadURL('https://google.com');
end;
Now you have a new function to update the preferences (proxy settings) in that moment : TChromium.UpdatePreferences
You can try it in the minibrowser demo. It has a new preferences form with the proxy settings and the custom header values.
If you still have problems with cookies maybe you should use the global cookie manager with the ICefCookieManager.SetCookie function.
Take a look at TChromium.SetCMStoragePath for an example about ICefCookieManager.
Thank you, but it isn't worked for me.
I decided it this way: ChromiumWindow1.ChromiumBrowser.LoadURL('http://google.com'); // browser do redirect on https://www.google.ru/ and set cookie. But this decision is not for everything.