MCPcopy
hub / github.com/github/docs / setLanguageFastlySurrogateKey

Function setLanguageFastlySurrogateKey

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

Source from the content-addressed store, hash-verified

31}
32
33export function setLanguageFastlySurrogateKey(req, res, next) {
34 res.set(KEY, `${SURROGATE_ENUMS.DEFAULT} ${makeLanguageSurrogateKey(req.language)}`)
35 return next()
36}
37
38export function makeLanguageSurrogateKey(langCode = null) {
39 if (!langCode) {

Callers

nothing calls this directly

Calls 2

makeLanguageSurrogateKeyFunction · 0.85
nextFunction · 0.50

Tested by

no test coverage detected