Skip to content

Commit c5fca7f

Browse files
Merge pull request #145 from cloudops/docs/mc-14947-sp-edgerules
Cleaning up
2 parents 1916eb9 + 2364572 commit c5fca7f

File tree

2 files changed

+37
-15
lines changed

2 files changed

+37
-15
lines changed
-32.1 KB
Binary file not shown.

en/stackpath-service/stackpath-sites-edgerules.md

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,46 @@ that inspect requests to see if they match certain conditions, and matching requ
1212

1313
Required permissions
1414

15-
Navigate to
15+
Navigate to the StackPath service, click on *Sites*, and click on the desired site. When the *Overview* page appears, click on the *EdgeRules* item on the left.
1616

1717
### View EdgeRules
1818

19-
### Predeined EdgeRules
19+
### Predefined EdgeRules
2020

2121
#### Force WWW connections
2222
#### Custom robots.txt file
2323
#### Pseudo-streaming
2424
#### Referrer protection
2525

26+
StackPath provides four commonly used rules as predefined EdgeRules.
27+
2628
- **Force WWW connections:** redirect http://acme.com to http://www.acme.com. Be aware that this would redirect http://portal.acme.com to http://www.portal.acme.com.
2729
- **Custom robots.txt file:** easily create and maintain a robots.txt file through the ui
2830
- **Pseduo-streaming:** Allows a client to specify a seek point in a file.
2931
- **Referrer protection:** Allows you to specify a set of domains from which users will be allowed to connect from, as identified by the `Referer` header. You can choose to allow empty referer headers. Requests not meeting these conditions will be blocked.
3032

31-
### Create a custom EdgeRule
33+
### Custom EdgeRules
34+
35+
The predefined EdgeRules cover only a small set of cases. You can create custom EdgeRules to specifically target traffic that is of interest to you.
3236

3337
The interface will present a text field for the name. A condition type can be selected. Upon selecting a condition type, the interface will display the options appropriate for the condition type. Additionally, once a condition type is selected, the interface will display an action to select for the EdgeRule. Depending on the selected action, the interface will show the appropriate options for the action.
3438

3539
### EdgeRule conditions
3640

37-
Conditions may use five different attributes for an EdgeRule.
41+
Conditions may inspect one of five different attributes for an EdgeRule.
42+
43+
- **URL:** The EdgeRule will to attempt to match a search pattern against the URL, which includes the protocol, hostname, path, and query parameters. When defining the pattern, you may use:
44+
- A **simple string** for a direct match. If the exact string is found in the URL, the pattern will match. The asterisk (*) may be used as a wildcard to match zero or more characters.
45+
- A **regular expression**. The pattern should be enclosed within a pair of forward slashes (/). If the regular expression finds at least one match, the condition will be triggered.
46+
- **Header:** Looks at entire header line.
47+
- A **simple string** for a direct match. If the exact string is found in the header line, the pattern will match. The asterisk (*) may be used as a wildcard to match zero or more characters.
48+
- A **regular expression**. The pattern should be enclosed within a pair of forward slashes (/). If the regular expression finds at least one match, the condition will be triggered.
49+
- **HTTP method:** Match against the request method. Select one or more methods from the popup menu.
50+
- **Status code:** Comma-separated list of HTTP status codes.
51+
- **Cookie:** Looks at cookie name and value.
52+
- A **simple string** for a direct match. If the exact string is found in the cookie, the pattern will match. The asterisk (*) may be used as a wildcard to match zero or more characters.
53+
- A **regular expression**. The pattern should be enclosed within a pair of forward slashes (/). If the regular expression finds at least one match, the condition will be triggered.
3854

39-
- **URL:**
40-
- **Header:**
41-
- **HTTP method:**
42-
- **Status code:**
43-
- **Cookie:**
4455

4556
### EdgeRule actions
4657

@@ -55,24 +66,28 @@ An EdgeRule may specify one of four general types of actions to execute when the
5566

5667
1. Add response header
5768
- Added to response from CDN to end user
58-
- Put the header name into the Key field.
69+
- Enter the header name into the **Key** field.
70+
- Enter the desired value in to the **Value** field
5971
1. Add header to CDN
6072
- Add to request from user to CDN
61-
- Put the header name into the Key field
73+
- Enter the header name into the **Key** field.
74+
- Enter the desired value in to the **Value** field
6275
1. Add header to origin
6376
- Add to request from CDN to origin server
64-
- Put the header name into the Key field
77+
- Enter the header name into the **Key** field.
78+
- Enter the desired value in to the **Value** field
6579
1. Modify header
6680
- Modify value of existing header <- Where? In the request?
67-
1. Remove header
81+
1. Hide header
6882
- From where? The request?
69-
- Seems like you can use this to replace the value in the header.
83+
- Enter the name of the header to hide in the **Header** field
7084

7185
#### Caching rules
7286

73-
1. Cache
87+
1. Cache -- specify a TTL
7488
1. Do not cache
7589
1. Never expire
90+
1. Bypass cache -- How is this different from Do not cache? The only example in the SP// docs I can find is https://stackpath.dev/docs/bypass-cache-on-url, which uses Do not cache lol
7691

7792
#### Redirect rules
7893

@@ -84,6 +99,13 @@ Not clear what happens here?
8499

85100
URL Signing policies allow you to restrict access to your content by configuring a "shared secret" with StackPath. This "shared secret" is used to apply an MD5 hashing algorithm on the URL to validate the signature supplied on the request. Since the "shared secret" is only known by the publisher and StackPath, URL signatures cannot be generated by unauthorized users.
86101

102+
- Passphrase
103+
- Passphrase field
104+
- MD5 token field
105+
- TTL field
106+
- IP address filter
107+
- URL signature path length (optional)
108+
87109
### List of general variables
88110

89111
| Variable name | Description |

0 commit comments

Comments
 (0)