MCPcopy
hub / github.com/freeCodeCamp/freeCodeCamp / prepareHeaders

Function prepareHeaders

client/src/utils/ajax.ts:508–511  ·  view source on GitHub ↗
(headers)

Source from the content-addressed store, hash-verified

506 fetchBaseQuery({
507 baseUrl: apiLocation,
508 prepareHeaders(headers) {
509 headers.set('CSRF-Token', getCSRFToken());
510 return headers;
511 },
512 credentials: 'include'
513 }),
514 // Retry in the case this is the initial request - csrf is not set yet, and initial returns 403

Callers

nothing calls this directly

Calls 1

getCSRFTokenFunction · 0.85

Tested by

no test coverage detected