Skip to content

Instantly share code, notes, and snippets.

@mikeumus
Created February 25, 2021 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeumus/07fbd9f6e4a17fd09c70a5c489c15aa0 to your computer and use it in GitHub Desktop.
Save mikeumus/07fbd9f6e4a17fd09c70a5c489c15aa0 to your computer and use it in GitHub Desktop.
resource "cloudflare_filter" {
description = ""
expression = "(http.request.uri.path eq \"/api/traces\")"
}
resource "cloudflare_filter" {
description = ""
expression = "(http.host in {\"trace.filevacuum.com\"} and not cf.tls_client_auth.cert_verified)"
}
resource "cloudflare_firewall_rule" {
description = "Jaeger Tracing API Endpoint"
action = "allow"
}
resource "cloudflare_page_rule" {
zone = "filevacuum.com"
target = "www.filevacuum.com/"
priority = 1
actions = {
forwarding_url {
status_code = 301
url = "https://filevacuum.com"
}
}
}
resource "cloudflare_record" {
domain = "filevacuum.com"
name = "trace.filevacuum.com"
type = "A"
ttl = "1"
proxied = "true"
value = "45.77.219.134"
}
resource "cloudflare_record" {
domain = "filevacuum.com"
name = "www.filevacuum.com"
type = "CNAME"
ttl = "1"
proxied = "true"
value = "filevacuum.com"
}
resource "cloudflare_zone" "filevacuum_com" {
zone = "filevacuum.com"
plan = "free"
}
resource "cloudflare_zone_settings_override" {
name = "filevacuum.com"
settings {
0rtt = "on"
advanced_ddos = "on"
always_online = "on"
always_use_https = "off"
automatic_https_rewrites = "on"
brotli = "off"
browser_cache_ttl = 14400
browser_check = "off"
cache_level = "aggressive"
challenge_ttl = 3.1536e+07
ciphers = []
cname_flattening = "flatten_at_root"
development_mode = "off"
edge_cache_ttl = 7200
email_obfuscation = "on"
hotlink_protection = "on"
http2 = "on"
http3 = "on"
ip_geolocation = "on"
ipv6 = "on"
max_upload = 100
min_tls_version = "1.0"
minify {
css = "off"
html = "off"
js = "off"
}
mirage = "off"
mobile_redirect {
mobile_subdomain = ""
status = "off"
strip_uri = false
}
opportunistic_encryption = "off"
opportunistic_onion = "on"
orange_to_orange = "off"
origin_error_page_pass_thru = "off"
polish = "off"
prefetch_preload = "off"
privacy_pass = "off"
pseudo_ipv4 = "off"
response_buffering = "off"
rocket_loader = "off"
security_header {
enabled = false
include_subdomains = false
max_age = 0
nosniff = false
preload = false
}
security_level = "essentially_off"
server_side_exclude = "on"
sort_query_string_for_cache = "off"
ssl = "off"
tls_1_2_only = "off"
tls_1_3 = "zrt"
tls_client_auth = "on"
true_client_ip_header = "off"
visitor_ip = "on"
waf = "off"
webp = "off"
websockets = "on"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment