MCPcopy
hub / github.com/fastify/fastify / getLastEntryInMultiHeaderValue

Function getLastEntryInMultiHeaderValue

lib/request.js:95–99  ·  view source on GitHub ↗
(headerValue)

Source from the content-addressed store, hash-verified

93}
94
95function getLastEntryInMultiHeaderValue (headerValue) {
96 // we use the last one if the header is set more than once
97 const lastIndex = headerValue.lastIndexOf(',')
98 return lastIndex === -1 ? headerValue.trim() : headerValue.slice(lastIndex + 1).trim()
99}
100
101function buildRequestWithTrustProxy (R, trustProxy) {
102 const _Request = buildRegularRequest(R)

Callers 1

getFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected