Since we’ve switched to a more recent Chromium version, we’ll check whether this can be implemented. Or maybe the ability to add custom headers (and thus passing your own data to a remote server for instance when browsing pages).
Should be possible with HEScript and events in the UserMain script. We would have to check the browsed URL and modify the header. We’ll check if this can work.
certainly HEScript is a powerful tool, but unfortunately I can not use it. I do not know what EVENTS are, where is the documentation for these EVENTS and how to call them. I am asking you to write the HESCRIPT documentation so that you can learn it. On the other hand, maybe you could use PHP, because people who can understand PHP can hardly understand HESCRIPT.
My request is also to help you with setting conditional CustomUserAgent
Thank you.
I know that i should use events OnBeforeNavigate, OnStartMainWindow, but i don’t know how can I catch URL which will be displayed. Maybe my English is bad, but i am asking about it. How to get URL and how to use regexp to compare URL to pattern.
It is very important to help me with this (and probably others) because, when I drag and drop url to application window i see website. This way it is easy hack see all the headers which we sent on drag&drop url
function OnBeforeNavigate(NewURL, TargetFrame: String): Boolean;
begin
// Before the application displays a page. Set Result to True to stop the operation.
if Pos("http://heserver", LowerCase(newURL)) > 0 then
begin
SetUIProp("crm", "CustomHeaderName", "My-SystemID");
SetUIProp("crm", "CustomHeaderValue", MD5OfAString("MySystemID" + GetManualHardwareID(2)));
end
else
begin
SetUIProp("crm", "CustomHeaderName", "");
SetUIProp("crm", "CustomHeaderValue", "");
end;
Result := False;
end;
Replace http://heserver by the URL you want (in lowercase) in
if Pos("http://heserver", LowerCase(newURL)) > 0 then
Thus, the custom header with unique system ID will only work on a given site (here http://heserver)
@gdgsupport I recently tried this script on exeOutput for php but I keep getting this error; Unknown identifier or variable is not declared: 'My'. Source position 2.33. & This error; Unknown identifier or variable is not declared: 'HashValue'. Source position 2.63.
How can I resolved this issue. Although I have already tried replacing the variables and also added the number of quotes to wrap around the variables. which executes but I don’t see the custom values appearing in the header whenever I use getallheader() PHP built in function