You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/application-gateway/rewrite-http-headers-url.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,23 +48,23 @@ A rewrite set is a collection of a Routing Rule, Condition and Action.
48
48
You can use rewrite conditions to evaluate the content of HTTP(S) requests and responses. This optional configuration enables you to perform a rewrite only when one or more conditions are met. The application gateway uses these types of variables to evaluate the content of requests and responses:
49
49
50
50
You can choose the following types to look for a condition:
51
-
- HTTP header (Request and Response)
52
-
- Supported [Server variables](#server-variables)
51
+
* HTTP header (Request and Response)
52
+
* Supported [Server variables](#server-variables)
53
53
54
54
A Condition lets you evaluate whether a specified header or variable exists by matching their values through text or a Regex pattern. For advanced rewrite configurations, you can also capture the value of header or server variable for later use under Rewrite Action. Know more about [pattern and capturing](#pattern-matching-and-capturing).
55
55
56
56
***Rewrite Action:** Rewrite action set allows you to rewrite Headers (Request or Response) or the URL components.
57
57
58
58
An action can have the following value types or their combinations:
59
-
- Text.
60
-
- Request header's value - To use a captured request header value, specify the syntax as `{http_req_headerName}`.
61
-
- Response header's value - To use a captured response header value from the preceding Condition, specify the syntax as `{http_resp_headerName}`. You can use `{capt_header_value_matcher}` when the value is captured from Action Set's "Set-Cookie" response header. Know more about [capture under Action set](#syntax-for-capturing).
62
-
- Server variable - To use a server variable, specify the syntax as `{var_serverVariable}`. [List of supported Server variables](#server-variables).
59
+
* Text.
60
+
* Request header's value - To use a captured request header value, specify the syntax as `{http_req_headerName}`.
61
+
* Response header's value - To use a captured response header value from the preceding Condition, specify the syntax as `{http_resp_headerName}`. You can use `{capt_header_value_matcher}` when the value is captured from Action Set's "Set-Cookie" response header. Know more about [capture under Action set](#syntax-for-capturing).
62
+
* Server variable - To use a server variable, specify the syntax as `{var_serverVariable}`. [List of supported Server variables](#server-variables).
63
63
64
64
When using an Action to rewrite a URL, the following operations are supported:
65
-
- URL path: The new value to be set as the path.
66
-
- URL Query String: The new value to which the query string must be rewritten.
67
-
- Re-evaluate path map: Specify if the URL path map must be re-evaluated after rewrite. If kept unchecked, the original URL path will be used to match the path-pattern in the URL path map. If set to true, the URL path map will be re-evaluated to check the match with the rewritten path. Enabling this switch helps in routing the request to a different backend pool post rewrite.
65
+
* URL path: The new value to be set as the path.
66
+
* URL Query String: The new value to which the query string must be rewritten.
67
+
* Re-evaluate path map: Specify if the URL path map must be re-evaluated after rewrite. If kept unchecked, the original URL path will be used to match the path-pattern in the URL path map. If set to true, the URL path map will be re-evaluated to check the match with the rewritten path. Enabling this switch helps in routing the request to a different backend pool post rewrite.
68
68
69
69
70
70
## Pattern matching and capturing
@@ -75,8 +75,8 @@ Patten matching and capturing are supported under Condition and Action (under Ac
75
75
Application Gateway uses regular expressions for pattern matching. You should use Regular Expression 2 (RE2) compatible expressions when writing your pattern matching syntax.
76
76
77
77
You can use pattern matching under both Condition and Action.
78
-
-**Condition**: This is used to match the values for a Header or Server Variable. To match a pattern under "Conditions" use the "pattern" property.
79
-
-**Action**: Pattern matching under Action Set is only available for Response header "Set-Cookie". To match a pattern for Set-Cookie under an action, use the "HeaderValueMatcher" property. If captured, its value can be used as {capt_header_value_matcher}. As there can be multiple Set-Cookie, a pattern matching here allows you to look for a specific cookie. Example: For a certain version of user-agent, you want to rewrite the set-cookie response header for "cookie2" with max-age=3600 (one hour). In this case, you can use
78
+
***Condition**: This is used to match the values for a Header or Server Variable. To match a pattern under "Conditions" use the "pattern" property.
79
+
***Action**: Pattern matching under Action Set is only available for Response header "Set-Cookie". To match a pattern for Set-Cookie under an action, use the "HeaderValueMatcher" property. If captured, its value can be used as {capt_header_value_matcher}. As there can be multiple Set-Cookie, a pattern matching here allows you to look for a specific cookie. Example: For a certain version of user-agent, you want to rewrite the set-cookie response header for "cookie2" with max-age=3600 (one hour). In this case, you can use
0 commit comments