File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,14 @@ resource "aws_cloudfront_distribution" "this" {
9898 custom_error_response {
9999 error_caching_min_ttl = 3000
100100 error_code = 404
101- response_code = 200
101+ response_code = var . override_status_code_404
102102 response_page_path = " /index.html"
103103 }
104104
105105 custom_error_response {
106106 error_caching_min_ttl = 3000
107107 error_code = 403
108- response_code = 403
108+ response_code = var . override_status_code_403
109109 response_page_path = " /index.html"
110110 }
111111
Original file line number Diff line number Diff line change @@ -36,6 +36,16 @@ variable "cloudfront_price_class" {
3636 default = " PriceClass_100"
3737}
3838
39+ variable "override_status_code_404" {
40+ type = number
41+ default = 200
42+ }
43+
44+ variable "override_status_code_403" {
45+ type = number
46+ default = 403
47+ }
48+
3949variable "tags" {
4050 type = map (string )
4151 default = {}
You can’t perform that action at this time.
0 commit comments