fix: set X-Robots-Tag: noindex on non-prod pages deployments (#1772)

This commit is contained in:
bo0tzz
2026-07-02 13:19:45 +02:00
committed by GitHub
parent e93e230cdf
commit 57ed374ac0
@@ -0,0 +1,21 @@
resource "cloudflare_ruleset" "immich_app_preview_noindex" {
zone_id = cloudflare_zone.immich_app.id
name = "Preview noindex"
description = "Add X-Robots-Tag: noindex to non-production (preview) Pages deployments"
kind = "zone"
phase = "http_response_headers_transform"
rules {
action = "rewrite"
action_parameters {
headers {
name = "X-Robots-Tag"
operation = "set"
value = "noindex"
}
}
expression = "ends_with(http.host, \".dev.immich.app\") or ends_with(http.host, \".preview.immich.app\") or ends_with(http.host, \".archive.immich.app\")"
description = "noindex preview hostnames"
enabled = true
}
}