-
Notifications
You must be signed in to change notification settings - Fork 2
/
page_rules.tf
110 lines (93 loc) · 2.2 KB
/
page_rules.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
resource "cloudflare_page_rule" "www_redirect" {
priority = 1
status = "active"
target = "www.tarkov.dev"
zone_id = var.CLOUDFLARE_ZONE_ID
actions {
forwarding_url {
url = "https://tarkov.dev"
status_code = 301
}
}
}
resource "cloudflare_page_rule" "cache_service" {
priority = 2
status = "active"
target = "cache.tarkov.dev/*"
zone_id = var.CLOUDFLARE_ZONE_ID
actions {
cache_level = "cache_everything"
ssl = "strict"
}
}
resource "cloudflare_page_rule" "status_services" {
priority = 3
status = "active"
target = "status.tarkov.dev/*"
zone_id = var.CLOUDFLARE_ZONE_ID
actions {
browser_cache_ttl = "120"
ssl = "strict"
}
}
resource "cloudflare_page_rule" "status_custom_cache" {
priority = 4
status = "active"
target = "status.tarkov.dev/api/status-page/heartbeat/api"
zone_id = var.CLOUDFLARE_ZONE_ID
actions {
cache_level = "cache_everything"
ssl = "strict"
}
}
resource "cloudflare_page_rule" "manager_service" {
priority = 5
status = "active"
target = "manager.tarkov.dev/*"
zone_id = var.CLOUDFLARE_ZONE_ID
actions {
ssl = "strict"
}
}
resource "cloudflare_page_rule" "data_json" {
priority = 6
status = "active"
target = "tarkov.dev/data/*.json"
zone_id = var.CLOUDFLARE_ZONE_ID
actions {
browser_cache_ttl = "86400"
cache_level = "cache_everything"
edge_cache_ttl = 86400
}
}
resource "cloudflare_page_rule" "fonts" {
priority = 7
status = "active"
target = "tarkov.dev/fonts/*"
zone_id = var.CLOUDFLARE_ZONE_ID
actions {
browser_cache_ttl = "31536000"
cache_level = "cache_everything"
edge_cache_ttl = 2678400
}
}
resource "cloudflare_page_rule" "images" {
priority = 8
status = "active"
target = "tarkov.dev/images/*"
zone_id = var.CLOUDFLARE_ZONE_ID
actions {
browser_cache_ttl = "31536000"
cache_level = "cache_everything"
edge_cache_ttl = 2678400
}
}
resource "cloudflare_page_rule" "socket_service" {
priority = 9
status = "active"
target = "socket.tarkov.dev/*"
zone_id = var.CLOUDFLARE_ZONE_ID
actions {
ssl = "strict"
}
}