Skip to content

Commit

Permalink
Generate random password for header auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Dec 17, 2023
1 parent 55a09e6 commit 4e44aeb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion terraform/docs-rs/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ resource "aws_cloudfront_origin_request_policy" "docs_rs" {
}
}

resource "random_password" "origin_auth" {
length = 32
special = false
}

resource "aws_cloudfront_distribution" "webapp" {
comment = local.domain_name

Expand Down Expand Up @@ -107,7 +112,7 @@ resource "aws_cloudfront_distribution" "webapp" {

custom_header {
name = "X-Origin-Auth"
value = "some_secret_value"
value = random_password.origin_auth.result
}
}

Expand Down

0 comments on commit 4e44aeb

Please sign in to comment.