Host
property Host: string read;
Example
procedure ScriptEvent(var Value: variant);
begin
if Request <> nil then
Value := Request.Host
else
Value := '';
end;
Usage
Returns Velox's request authority truncated before the first colon, stripping normal ports but corrupting bracketed IPv6 hosts.
Additional Technical Info
Indy initially selects the Host request-header value and can fall back to the host parsed from an absolute-form request target when that header value is empty. The WebBroker bridge then returns everything before the first colon using Fetch(Value, ':', False).
For a normal example.test:8443, this returns example.test; read ServerPort separately for the bridge's port result. The algorithm is not IPv6-aware: [2001:db8::1]:8443 returns only [. It also performs no lowercasing, trailing-dot removal, IDNA conversion, allowed-host validation or proxy authority reconciliation.
Treat Host as untrusted routing metadata. Never use it alone to select filesystem paths, credentials, tenants, redirect destinations or privileged configuration. Validate against an explicit allow-list after standards-aware authority parsing, and configure trusted reverse proxies to reject conflicting/malformed authority information before Velox.
Empty or malformed values remain possible. The property describes the bridge's selected/truncated text, not a verified DNS name or the actual local server interface. Test Request for nil.
External references
Created 2026-07-15