Skip to content

Commit 094c341

Browse files
authored
PR review resolutions (#6)
* Update rewrite-http-headers-url.md * Update toc.yml
1 parent f6f301d commit 094c341

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

articles/application-gateway/application-gateway-secureflag-sessionaffinity.md renamed to articles/application-gateway/application-gateway-secure-flag-session-affinity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.author: jaysoni
1111
---
1212

1313
# Setting HTTPOnly or Secure flag for Session Affinity cookie
14-
In this guide you learn to create a Rewrite set for your Application Gateway and configure Secure and HttpOnly [ApplicationGatewayAffinity cookie](configuration-http-settings.md#cookie-based-affinity)
14+
In this guide you learn to create a Rewrite set for your Application Gateway and configure Secure and HttpOnly [ApplicationGatewayAffinity cookie](configuration-http-settings.md#cookie-based-affinity).
1515

1616

1717
## Prerequisites

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,27 @@ A rewrite set is a collection of a Routing Rule, Condition and Action.
4444

4545
* **Request routing rule association:** The rewrite configuration is associated to a source listener via its routing rule. When you use a routing rule of the type Basic, the rewrite configuration is associated with its listener and works as a global rewrite. When you use a Path-based routing rule, the rewrite configuration is defined as per the URL path map. In the latter case, it applies only to a specific path area of a site. You can apply a rewrite set to multiple routing rules but a routing rule can have only one rewrite associated with it.
4646

47-
* **Rewrite Condition:** This is an optional configuration. Based on the conditions that you define, the Application Gateway will evaluate the contents of the HTTP(S) requests and responses. The susequent "rewrite action" will occur if the HTTP(S) request or response matches this condition. If you associate more than one condition with an action, the action occurs only when all the conditions are met. In other words, it is a logical AND operation.
47+
* **Rewrite Condition:** This is an optional configuration. Based on the conditions that you define, the Application Gateway will evaluate the contents of the HTTP(S) requests and responses. The subsequent "rewrite action" will occur if the HTTP(S) request or response matches this condition. If you associate more than one condition with an action, the action occurs only when all the conditions are met. In other words, it is a logical AND operation.
4848
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:
4949

5050
You can choose the following types to look for a condition:
51-
1. HTTP header (Request and Response)
52-
1. Supported [Server variables](#server-variables)
51+
- HTTP header (Request and Response)
52+
- Supported [Server variables](#server-variables)
5353

5454
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).
5555

5656
* **Rewrite Action:** Rewrite action set allows you to rewrite Headers (Request or Response) or the URL components.
5757

5858
An action can have the following value types or their combinations:
59-
1. Text.
60-
1. Request header's value - To use a captured request header value, specify the syntax as `{http_req_headerName}`.
61-
1. Response header's value - To use a captured response header value from the preceeding 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-
1. 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).
6363

6464
When using an Action to rewrite a URL, the following operations are supported:
65-
1. URL path: The new value to be set as the path.
66-
1. URL Query String: The new value to which the query string must be rewritten to.
67-
1. 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.
6868

6969

7070
## Pattern matching and capturing
@@ -75,8 +75,8 @@ Patten matching and capturing are supported under Condition and Action (under Ac
7575
Application Gateway uses regular expressions for pattern matching. You should use Regular Expression 2 (RE2) compatible expressions when writing your pattern matching syntax.
7676

7777
You can use pattern matching under both Condition and Action.
78-
1. **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-
1. **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
8080
* Condition - Type: Request header, Header name: user-agent, Pattern to match: *2.0
8181
* Action - Rewrite type: Response header, Action type: Set, Header name: Set-Cookie, Header Value Matcher: cookie2=(.*), Header value: cookie2={capt_header_value_matcher_1};Max-Age=3600
8282

articles/application-gateway/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
- name: Create and rewrite HTTP headers
269269
href: tutorial-http-header-rewrite-powershell.md
270270
- name: Add secure flag for cookies
271-
href: application-gateway-secureflag-sessionaffinity.md
271+
href: application-gateway-secure-flag-session-affinity.md
272272
- name: URL rewrite
273273
items:
274274
- name: Azure portal

0 commit comments

Comments
 (0)