Skip to content

Commit

Permalink
Merge pull request #12 from fastly/custom_challenge_image
Browse files Browse the repository at this point in the history
Rev providers and custom logo
  • Loading branch information
BrooksCunningham authored Aug 15, 2024
2 parents d8feb7a + 6201103 commit bb37d1f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gold-standard-starter/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
# https://registry.terraform.io/providers/signalsciences/sigsci/latest
sigsci = {
source = "signalsciences/sigsci"
version = ">= 3.0.0"
version = ">= 3.3.0"
}
}
}
7 changes: 7 additions & 0 deletions ngwaf-terraform-edge-deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ resource "fastly_service_vcl" "frontend-vcl-service" {
#### Adds the necessary header to enable response headers from the NGWAF edge deployment, which may then be used for logging.
# Also, removes the sensitive response headers before delivering the response to the client

snippet {
name = "Update for custom logo"
content = file("${path.module}/vcl/custom_challenge_logo.vcl")
type = "init"
priority = 100
}

snippet {
name = "Add ngwaf log headers"
content = file("${path.module}/vcl/add_ngwaf_log_headers.vcl")
Expand Down
4 changes: 2 additions & 2 deletions ngwaf-terraform-edge-deploy/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ terraform {
required_providers {
fastly = {
source = "fastly/fastly"
version = ">= 5.2.2"
version = ">= 5.11.0"
}
sigsci = {
source = "signalsciences/sigsci"
version = ">= 3.0.0"
version = ">= 3.3.0"
}
http = {
source = "hashicorp/http"
Expand Down
5 changes: 5 additions & 0 deletions ngwaf-terraform-edge-deploy/vcl/custom_challenge_logo.vcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sub vcl_recv {
if (req.url ~ "/fastly/logo") {
set req.url = "/static-assets/challenge-robot.jpg";
}
}

0 comments on commit bb37d1f

Please sign in to comment.