|
<< Click to Display Table of Contents >> Navigation: Forum > Hide version number |
Pages: 1 2
07-29-2020, 01:36 AM:
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?
07-29-2020, 07:11 AM:
TIWServerController OnMetaTag:
Code:
//---------------------------------------------------------------------------
void __fastcall TIWServerController::IWServerControllerBaseMetaTag(TIWApplication *ASession, const UnicodeString AMetaName, UnicodeString &vMetaValue)
{
if(AMetaName == "generator") { vMetaValue = ""; }
}
//---------------------------------------------------------------------------
07-29-2020, 09:50 AM:
(07-29-2020, 07:11 AM)MJS@mjs.us Wrote: [ -> ]TIWServerController OnMetaTag:
Code:
//---------------------------------------------------------------------------
void __fastcall TIWServerController::IWServerControllerBaseMetaTag(TIWApplication *ASession, const UnicodeString AMetaName, UnicodeString &vMetaValue)
{
if(AMetaName == "generator") { vMetaValue = ""; }
}
//---------------------------------------------------------------------------
Doesn't work!!
07-29-2020, 10:24 AM:
(07-29-2020, 09:50 AM)Comograma Wrote: [ -> ] (07-29-2020, 07:11 AM)MJS@mjs.us Wrote: [ -> ]TIWServerController OnMetaTag:
Code:
//---------------------------------------------------------------------------
void __fastcall TIWServerController::IWServerControllerBaseMetaTag(TIWApplication *ASession, const UnicodeString AMetaName, UnicodeString &vMetaValue)
{
if(AMetaName == "generator") { vMetaValue = ""; }
}
//---------------------------------------------------------------------------
Doesn't work!!
Did a quick check... works for me.
07-29-2020, 09:08 PM:
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:
(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
07-31-2020, 01:11 PM:
(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, 08:27 PM:
(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
08-02-2020, 09:31 AM:
(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...
08-05-2020, 05:38 PM:
(07-29-2020, 01:36 AM)joel Wrote: [ -> ]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?Use:
Code:
procedure TIWServerController.IWServerControllerBaseMetaTag(
ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
if AMetaName = 'GENERATOR' then vMetaValue := '';
end;
or for the future:
Code:
procedure TIWServerController.IWServerControllerBaseMetaTag(
ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
if AnsiLowerCase(AMetaName) = 'generator' then vMetaValue := '';
end;