MCPcopy
hub / github.com/github/docs / setDefaultFastlySurrogateKey

Function setDefaultFastlySurrogateKey

middleware/set-fastly-surrogate-key.js:28–31  ·  view source on GitHub ↗
(req, res, next)

Source from the content-addressed store, hash-verified

26}
27
28export function setDefaultFastlySurrogateKey(req, res, next) {
29 res.set(KEY, `${SURROGATE_ENUMS.DEFAULT} ${makeLanguageSurrogateKey()}`)
30 return next()
31}
32
33export function setLanguageFastlySurrogateKey(req, res, next) {
34 res.set(KEY, `${SURROGATE_ENUMS.DEFAULT} ${makeLanguageSurrogateKey(req.language)}`)

Callers 1

static-assets.jsFile · 0.90

Calls 2

makeLanguageSurrogateKeyFunction · 0.85
nextFunction · 0.50

Tested by

no test coverage detected