Skip to content

Commit 16eff32

Browse files
authored
Update rewrite-http-headers-url.md
1 parent 5a494a7 commit 16eff32

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

articles/application-gateway/rewrite-http-headers-url.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -149,24 +149,6 @@ Application Gateway supports the following server variables for mutual authentic
149149

150150
## Common scenarios for header rewrite
151151

152-
### Remove port information from the X-Forwarded-For header
153-
A rewrite rule set contains:
154-
155-
* **Request routing rule association:** The rewrite configuration is associated to the source listener via the routing rule. When you use a basic routing rule, the rewrite configuration is associated with a source listener and is a global header rewrite. When you use a path-based routing rule, the rewrite configuration is defined on the URL path map. In that case, it applies only to the specific path area of a site. You can create multiple rewrite sets and apply each rewrite set to multiple listeners. But you can apply only one rewrite set to a specific listener.
156-
157-
* **Rewrite Condition**: This configuration is optional. Rewrite conditions evaluate the content of the HTTP(S) requests and responses. The rewrite action occurs if the HTTP(S) request or response matches the rewrite condition. If you associate more than one condition with an action, the action occurs only when all the conditions are met. In other words, the operation is a logical AND operation.
158-
159-
* **Rewrite type**: There are 3 types of rewrites available:
160-
* Rewriting request headers
161-
* Rewriting response headers
162-
* Rewriting URL components
163-
* **URL path**: The value to which the path is to be rewritten.
164-
* **URL Query String**: The value to which the query string is to be rewritten.
165-
* **Reevaluate path map**: Used to determine whether the URL path map is to be reevaluated or not. If kept unchecked, the original URL path is used to match the path-pattern in the URL path map. If set to true, the URL path map is reevaluated to check the match with the rewritten path. Enabling this switch helps in routing the request to a different backend pool post rewrite.
166-
167-
168-
### Common scenarios for header rewrite
169-
170152
#### Remove port information from the X-Forwarded-For header
171153

172154
Application Gateway inserts an X-Forwarded-For header into all requests before it forwards the requests to the backend. This header is a comma-separated list of IP ports. There might be scenarios in which the backend servers only need the headers to contain IP addresses. You can use header rewrite to remove the port information from the X-Forwarded-For header. One way to do this is to set the header to the add_x_forwarded_for_proxy server variable. Alternatively, you can also use the variable client_ip:

0 commit comments

Comments
 (0)