Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions aws-cf-reverse-proxy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ resource "aws_cloudfront_distribution" "site" {
origin_path = origin.value.origin_path

custom_origin_config {
origin_protocol_policy = "https-only"
http_port = 80
https_port = 443
origin_ssl_protocols = ["TLSv1.2"]
origin_protocol_policy = "https-only"
http_port = 80
https_port = 443
origin_ssl_protocols = ["TLSv1.2"]
origin_read_timeout = var.origin_read_timeout
origin_keepalive_timeout = 60
}

custom_header {
Expand Down
5 changes: 5 additions & 0 deletions aws-cf-reverse-proxy/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,8 @@ variable "cache_default_ttl" {
default = 60
}

variable "origin_read_timeout" {
description = "How long CloudFront should wait for a response from the origin (in seconds)"
type = number
default = 60
}