Share via


IFPCWebPublishingProperties::SendOriginalHostHeader property

Applies to: desktop apps only

The SendOriginalHostHeader property gets or sets a Boolean value that indicates whether Forefront TMG sends the original HTTP Host header or a Host header corresponding to the name or IP address specified in the WebSite property of the rule.

This property is read/write.

Syntax

HRESULT put_SendOriginalHostHeader(
  VARIANT_BOOL fSendOriginalHostHeader
);

HRESULT get_SendOriginalHostHeader(
  VARIANT_BOOL *pfSendOriginalHostHeader
);
' Data type: Boolean

Property SendOriginalHostHeader( _
  ByVal fSendOriginalHostHeader As VARIANT_BOOL, _
  ByVal pfSendOriginalHostHeader As VARIANT_BOOL _
) As Boolean

Property value

Boolean value that indicates whether Forefront TMG sends the original HTTP Host header or a Host header corresponding to the name or IP address specified in the WebSite property of the rule. The default value is False.

Error codes

These property methods return S_OK if the call is successful; otherwise, they return an error code.

Remarks

This property is read/write. Its default value is False (VARIANT_FALSE in C++).

By default, Forefront TMG sends a Host header corresponding to the published site, that is, a Host header corresponding to the name or IP address specified in the WebSite property of the rule, rather than the original Host header that Forefront TMG received. However, there are scenarios where the published servers rely on the Host header to generate links on a page instead of generating relative links. These servers must receive the original Host header with the domain name or IP address that is reachable by the client. This property allows those Web servers to receive the original Host header.

Examples

The following VBScript code fragment sets SendOriginalHostHeader to True for the first policy rule if it is a Web publishing rule.

' Define the constant needed
Const fpcPolicyRuleWebPublishing = 2
' Create the root object.
Dim root  ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
' Declare the object needed.
Dim rule            ' An FPCPolicyRule object
Set rule = root.GetContainingArray.ArrayPolicy.PolicyRules(1)
If rule.Type = fpcPolicyRuleWebPublishing Then
    rule.WebPublishingProperties.SendOriginalHostHeader = True
    rule.Save
End If

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

IDL

Msfpccom.idl

DLL

Msfpccom.dll

See also

FPCWebPublishingProperties

 

 

Build date: 7/12/2010