summaryrefslogtreecommitdiff
path: root/tf/cloudflare/ruleset.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tf/cloudflare/ruleset.nix')
-rw-r--r--tf/cloudflare/ruleset.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/tf/cloudflare/ruleset.nix b/tf/cloudflare/ruleset.nix
index 1be98aa..7da114d 100644
--- a/tf/cloudflare/ruleset.nix
+++ b/tf/cloudflare/ruleset.nix
@@ -60,5 +60,22 @@
}
];
};
+
+ binary-cache = {
+ kind = "zone";
+ name = "default";
+ phase = "http_request_cache_settings";
+ zone_id = lib.tfRef "var.zone_id";
+
+ rules = {
+ action = "set_cache_settings";
+ action_parameters = {
+ cache = true;
+ };
+ description = "nix cache";
+ enabled = true;
+ expression = "(ssl and http.host eq \"cache.mydadleft.me\" and http.request.uri.query eq \"\" and ends_with(http.request.uri.path, \"nar\"))";
+ };
+ };
};
}