Skip to content

Commit

Permalink
Enable JA3 fingerprinting for DGU
Browse files Browse the repository at this point in the history
  • Loading branch information
MuriloDalRi committed Apr 26, 2024
1 parent 1497055 commit 0aae1a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/datagovuk/datagovuk.vcl.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ backend F_cname_find_eks_${environment}_govuk_digital {
sub vcl_recv {
${indent(2, file("${module_path}/../shared/_boundary_headers.vcl.tftpl"))}

if (fastly.ff.visits_this_service == 0 && req.restarts == 0) {
set req.http.Client-JA3 = tls.client.ja3_md5;

# Block requests that match a known bad signature
if (table.lookup(ja3_signature_denylist, req.http.Client-JA3, "false") == "true") {
error 403 "Forbidden";
}
}

# Serve 404 if source IP/netblock is denylisted.
if (table.lookup(ip_address_denylist, client.ip)) {
error 404 "Not Found";
Expand Down

0 comments on commit 0aae1a3

Please sign in to comment.