Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AimeeKnight
Forked from mshmsh5000/request-id.vcl
Created July 28, 2022 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AimeeKnight/77a3ce544faf201d496ee010049e37ac to your computer and use it in GitHub Desktop.
Save AimeeKnight/77a3ce544faf201d496ee010049e37ac to your computer and use it in GitHub Desktop.
Fastly VCL for X-Request-ID header
# Unique request ID header
sub vcl_recv {
set req.http.X-Request-ID = digest.hash_sha256(now randomstr(64) req.http.host req.url req.http.Fastly-Client-IP server.identity);
#FASTLY recv
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment