An HTTP response rewrite is applied to the HTTP response going out from the servers to the client.
Procedure
- Open the Layer 7 HTTP virtual server.
- Click to configure the load balancer rules for the HTTP Response Rewrite.
All match values accept regular expressions.
Supported Match Condition |
Description |
HTTP Response Header |
This condition is used to match HTTP response messages from backend servers by HTTP header fields. http_response.header_name - header name to match http_response.header_value - value to match |
HTTP Response Method |
Match an HTTP response method. http_response.method - value to match |
HTTP Response URI |
Match an HTTP response URI. http_response.uri - value to match |
HTTP Response URI Arguments |
Match an HTTP response URI arguments. http_response.uri_args - value to match |
HTTP Response Version |
Match an HTTP response version. http_response.version - value to match |
HTTP Response Cookie |
Match any HTTP response cookie. http_response.cookie_value - value to match |
Client SSL |
Match client SSL profile ID. ssl_profile_id - value to match |
TCP Header Port |
Match a TCP source or the destination port. tcp_header.source_port - source port to match tcp_header.destination_port - destination port to match |
IP Header Source |
Matches IP header fields in of HTTP messages. The source type must be either a single IP address, or a range of IP addresses, or a group. See Add a Group. The source IP address of HTTP messages should match IP addresses which are configured in groups. Both IPv4 and IPv6 addresses are supported. ip_header.source_address - source address to match ip_header.destination_address - destination address to match |
Variable |
Create a variable and assign a value to the variable. |
Case Sensitive |
Set a case-sensitive flag for HTTP header value comparison. |
- Select an action:
Action |
Description |
HTTP Response Header Rewrite |
This action is used to rewrite header fields of HTTP response messages to specified new values. http_response.header_name - header name http_response.header_value - value to write |
HTTP Response Header Delete |
This action is used to delete header fields of HTTP response messages. http_request.header_delete - header name http_request.header_delete - value to write |
Variable Persistence Learn |
Select a generic persistence profile and enter a variable name. You can also enable Hash Variable. If the variable value is long, hashing the variable ensures that it will be correctly stored in the persistence table. If Hash Variable is not enabled, only the fixed prefix part of the variable value is stored in the persistence table if the variable value is long. As a result, two different requests with long variable values might be dispatched to the same backend server (because their variable values have the same prefix part) when they should be dispatched to different backend servers. |
- Click Save and Apply.