I need to hide the version number in the html.
<meta Name="GENERATOR" content="IntraWeb v15.2.6 Serial 123124">
I think there is a property on servercontroller to do this. Does anyone know what it is?
TIWServerController OnMetaTag:
Code:
//---------------------------------------------------------------------------
void __fastcall TIWServerController::IWServerControllerBaseMetaTag(TIWApplication *ASession, const UnicodeString AMetaName, UnicodeString &vMetaValue)
{
if(AMetaName == "generator") { vMetaValue = ""; }
}
//---------------------------------------------------------------------------
In Delphi, as others have posted, use the OnMetaTag event in Servercontroller:
Code:
procedure TBSIServerController.IWServerControllerBaseMetaTag(
ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
if AMetaName='generator' then
begin
vMetaValue := 'My New Stuff';
end;
end;
Dan
(07-31-2020, 11:19 AM)Comograma Wrote: [ -> ] (07-29-2020, 09:08 PM)DanBarclay Wrote: [ -> ]In Delphi, as others have posted, use the OnMetaTag event in Servercontroller:
Code:
procedure TBSIServerController.IWServerControllerBaseMetaTag(
ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
if AMetaName='generator' then
begin
vMetaValue := 'My New Stuff';
end;
end;
Doesn't work. I even try to do a trace with the debugger but it doesn't even reachs there.
Dan
It works for me without issues.
Thanks everyone.
(07-31-2020, 11:19 AM)Comograma Wrote: [ -> ] (07-29-2020, 09:08 PM)DanBarclay Wrote: [ -> ]In Delphi, as others have posted, use the OnMetaTag event in Servercontroller:
Code:
procedure TBSIServerController.IWServerControllerBaseMetaTag(
ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
if AMetaName='generator' then
begin
vMetaValue := 'My New Stuff';
end;
end;
Doesn't work. I even try to do a trace with the debugger but it doesn't even reachs there.
This should work fine for you in current releases. What is your IW version? As I recall this was added in one of the 15.x releases, but you can check the release blogs to be sure. Does your ServerController list an OnMetaTag event?
Dan
(07-31-2020, 11:19 AM)Comograma Wrote: [ -> ]Doesn't work. I even try to do a trace with the debugger but it doesn't even reachs there.
I tested on your demo project and it works fine.
Have in mind that it only works in IntraWeb Ultimate licenses...