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: README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -167,6 +167,7 @@ webhooks_priority = 100
167
167
|[ip_set_rules]| Custom IP Set rules for the WAF |`map(object)`|`{}`| no |
168
168
| redacted_headers | Headers to redact from logs. Keys are the header names, and values are the action to take. Valid actions are `"HASH"` and `"SUBSTITUTION"`. |`map(string)`|`{sane defaults}`| no |
169
169
|[rate_limit_rules]| Rate limiting configuration for the WAF. |`map(object)`|`{}`| no |
170
+
|[redirect_paths]| Ordered cache behaviors for path-based redirects. Each entry attaches a CloudFront function that performs the redirect for requests matching the given path pattern. |`list(object)`|`[]`| no |
170
171
| origin_domain | Optional custom origin domain to point to. Defaults to `origin.subdomain.domain`. Only used if `use_custom_origin` is set to `true`. |`string`| n/a | no |
171
172
| passive | Enable passive mode for the WAF, counting all requests rather than blocking. |`bool`|`false`| no |
172
173
| request_policy | Managed request policy to associate with the distribution. See the [managed policies][managed-policies] for valid values. |`string`|`"AllViewer"`| no |
@@ -293,6 +294,41 @@ module "cloudfront_waf" {
293
294
| priority | Rule priority. Defaults to the rule's position in the map + the number of IP set rules. |`number`|`null`| no |
294
295
| window | Number of seconds to limit requests in. Options are: 60, 120, 300, 600 |`number`|`60`| no |
295
296
297
+
### redirect_paths
298
+
299
+
To redirect traffic from a specific path to another URL, you can specify a list
300
+
of path-based redirect behaviors. Each entry creates an [ordered cache
301
+
behavior][ordered-behaviors] that fires a CloudFront function before the request
302
+
reaches the origin.
303
+
304
+
> [!TIP]
305
+
> Use the [`tofu-modules-aws-cloudfront-redirect`][cloudfront-redirect] module
306
+
> with `create_distribution = false` to create the CloudFront function, then
0 commit comments