summaryrefslogtreecommitdiff
path: root/terraform/rulesets.tf
diff options
context:
space:
mode:
Diffstat (limited to 'terraform/rulesets.tf')
-rw-r--r--terraform/rulesets.tf26
1 files changed, 26 insertions, 0 deletions
diff --git a/terraform/rulesets.tf b/terraform/rulesets.tf
new file mode 100644
index 0000000..88a060e
--- /dev/null
+++ b/terraform/rulesets.tf
@@ -0,0 +1,26 @@
+resource "cloudflare_ruleset" "getchoo_com_redirects" {
+ kind = "zone"
+ name = "funny redirects"
+ phase = "http_request_dynamic_redirect"
+
+ description = "Redirect to Tick Tock by Joji"
+ rules {
+ expression = "(http.request.uri.path eq \"/hacks\" and http.host eq \"getchoo.com\")"
+
+ action = "redirect"
+ action_parameters {
+ from_value {
+ preserve_query_string = false
+ status_code = 301
+ target_url {
+ value = "https://www.youtube.com/watch?v=RvVdFXOFcjw"
+ }
+ }
+ }
+ description = "tick tock hacks"
+ enabled = true
+ }
+
+ zone_id = var.cloudflare_getchoo_com_zone_id
+}
+