diff --git a/site-redirect/main.tf b/site-redirect/main.tf index 70ec8fa..3e37e72 100644 --- a/site-redirect/main.tf +++ b/site-redirect/main.tf @@ -116,7 +116,7 @@ resource "aws_cloudfront_distribution" "website_cdn" { cached_methods = ["GET", "HEAD"] forwarded_values { - query_string = false + query_string = var.forward-query-string cookies { forward = "none" diff --git a/site-redirect/variables.tf b/site-redirect/variables.tf index e3eafe2..0197491 100644 --- a/site-redirect/variables.tf +++ b/site-redirect/variables.tf @@ -40,3 +40,9 @@ variable "default_root_object" { description = "CloudFront default root object" default = "index.html" } + +variable "forward-query-string" { + type = bool + description = "Forward the query string to the origin" + default = true +} \ No newline at end of file