File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,6 +101,58 @@ resource "cloudflare_ruleset" "cache_rules" {
101101 ]
102102 }
103103 }
104+ },
105+ {
106+ ref = " build-haxe-org-cache-rule"
107+ description = " Set cache settings for build.haxe.org"
108+ expression = " (http.host eq \" build.haxe.org\" )"
109+ enabled = true
110+ action = " set_cache_settings"
111+ action_parameters = {
112+ cache = true
113+ edge_ttl = {
114+ mode = " respect_origin"
115+ status_code_ttl = [
116+ {
117+ status_code_range = {
118+ from = 200
119+ to = 399
120+ }
121+ value = 60 * 60 * 24 * 1 # 1 day
122+ },
123+ {
124+ status_code = 404
125+ value = 60 * 60 * 1 # 1 hour
126+ }
127+ ]
128+ }
129+ }
130+ },
131+ {
132+ ref = " blog-haxe-org-cache-rule"
133+ description = " Set cache settings for blog.haxe.org"
134+ expression = " (http.host eq \" blog.haxe.org\" )"
135+ enabled = true
136+ action = " set_cache_settings"
137+ action_parameters = {
138+ cache = true
139+ edge_ttl = {
140+ mode = " respect_origin"
141+ status_code_ttl = [
142+ {
143+ status_code_range = {
144+ from = 200
145+ to = 399
146+ }
147+ value = 60 * 60 * 24 * 1 # 1 day
148+ },
149+ {
150+ status_code = 404
151+ value = 60 * 60 * 1 # 1 hour
152+ }
153+ ]
154+ }
155+ }
104156 }
105157 ]
106158}
@@ -207,6 +259,7 @@ resource "cloudflare_dns_record" "blog-haxe-org" {
207259 type = " CNAME"
208260 content = aws_cloudfront_distribution. blog-haxe-org . domain_name
209261 ttl = 1
262+ proxied = true
210263}
211264
212265resource "cloudflare_dns_record" "build-haxe-org" {
@@ -215,6 +268,7 @@ resource "cloudflare_dns_record" "build-haxe-org" {
215268 type = " CNAME"
216269 content = aws_cloudfront_distribution. build-haxe-org . domain_name
217270 ttl = 1
271+ proxied = true
218272}
219273
220274resource "cloudflare_dns_record" "code-haxe-org" {
You can’t perform that action at this time.
0 commit comments