MCPcopy Create free account
hub / github.com/cfworker/cfworker / buildAuthHeaders

Function buildAuthHeaders

packages/dev/src/cloudflare-api.js:15–24  ·  view source on GitHub ↗

* @param {string} apiKey Cloudflare API key * @param {string | undefined} accountEmail Cloudflare account email * @returns {Object. }

(apiKey, accountEmail)

Source from the content-addressed store, hash-verified

13 * @returns {Object.<string, string>}
14 */
15function buildAuthHeaders(apiKey, accountEmail) {
16 return accountEmail
17 ? {
18 'X-Auth-Email': accountEmail,
19 'X-Auth-Key': apiKey
20 }
21 : {
22 Authorization: 'Bearer ' + apiKey
23 };
24}
25
26/**
27 * @param {string} accountId Cloudflare account id

Callers 8

getWorkersDevSubdomainFunction · 0.85
deployToWorkersDevFunction · 0.85
deployFunction · 0.85
getNamespaceFunction · 0.85
getNamespaceKeysFunction · 0.85
createNamespaceFunction · 0.85
bulkKVFunction · 0.85
bulkDeleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected