Tech Notes
Tech Notes |
Overriding built-in pages and increasing the security of the INDEX page
Unless disabled, requesting appid:index or appid:indext will provide a list of all the public pages in a WebHub application. The index page provides the information as a bulleted list, and the indext page provides the same information in an html table.
There are two ways to increase security.
- Create your own pages with PageID of INDEX and INDEXT. That will completely replace the built-in pages.
- Hide specific private pages from the index by starting their description with a hyphen. For example:
<whpage pageid="admin" desc="-administrator login page not shown to public"> page content here... </whpage>
The built-in pages are completely standalone. If you like the idea of a site index but you want to embed the list onto your own custom-designed web page, you have to create a webaction component which calls the function that produces the list.
procedure TfmNavigation.waSiteIndexExecute(Sender: TObject); begin inherited; pWebApp.SendString(pWebApp.BuiltInIndex(False)); //BuiltInIndex method added in v2.089 end;
Version-Specific Notes
For WebHub Components v2.079+
TwhApplication.BuiltInsEnabled
A Delphi programmer can disable all built-in pages by setting BuiltInsEnabled Property of TwhApplication to FALSE. You can also enable/disable specific built in pages by toggling them invidividually within the BuiltIns property of the same component.
For WebHub Components v1.700 to v2.650
ThtWebApp.BuiltInsEnabled
A Delphi programmer can disable all built-in pages by setting BuiltInsEnabled Property of ThtWebApp to FALSE. You can also enable/disable specific built in pages by toggling them invidividually within the BuiltIns Property of the same component.
To make a single page private in WebHub Syntax Stage 1, put a hyphen in front of the page description as shown here:
<h1>-Page:admin=,,,-hidden administrative page</h1>
Running DynHelp.exe v1.2.0.6 on WebHub-v2.125 built by D14
Calc time: 234 ms

