< Home

http x-forward enable

Function

The http x-forward enable command enables the HTTP X-Forward function.

The undo http x-forward enable command disables the HTTP X-Forward function.

Format

http x-forward enable

undo http x-forward enable

Parameters

None

Views

Virtual server view

Default Level

2: Configuration level

Usage Guidelines

By default, the HTTP X-Forward function is disabled.

After this function is enabled, the FW inserts the X-Forwarded-For field into the HTTP header of each HTTP packet sent from the client. This field carries the real IP address of the client to the real server that supports X-Forwarded-For.

This function can be enabled only after the protocol command is run to set the virtual server protocol to HTTP or HTTPS (SSL uninstallation must be configured for HTTPS). After the virtual server protocol is changed to another protocol, the HTTP X-Forward function is automatically disabled.

If FW translates the source addresses of the traffic destined to the real server, use the source NAT function of the server load balancing module instead of the global source NAT function. Otherwise, the address stickiness function of the client cannot take effect.

Example

# Enable the HTTP X-Forward function.

<sysname> system-view
[sysname] slb
[sysname-slb] vserver 1 vs1
[sysname-slb-vserver-1] protocol http
[sysname-slb-vserver-1] http x-forward enable
Info: The http x-forward function is only available when the real servers support it.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >