@obelism/content 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -186,7 +186,10 @@ class ContentClient {
186
186
  headers: {
187
187
  ...headersToObject(merged.headers),
188
188
  Accept: 'application/json',
189
- Authorization: `Bearer ${this.#token}`
189
+ // Not `Authorization`: Cloudflare never caches a request that
190
+ // carries it, and this header lets the API answer a delivery
191
+ // token from its edge cache.
192
+ 'Obelism-Token': this.#token
190
193
  },
191
194
  signal: merged.signal ? AbortSignal.any([
192
195
  merged.signal,
package/dist/index.mjs CHANGED
@@ -184,7 +184,10 @@ class ContentClient {
184
184
  headers: {
185
185
  ...headersToObject(merged.headers),
186
186
  Accept: 'application/json',
187
- Authorization: `Bearer ${this.#token}`
187
+ // Not `Authorization`: Cloudflare never caches a request that
188
+ // carries it, and this header lets the API answer a delivery
189
+ // token from its edge cache.
190
+ 'Obelism-Token': this.#token
188
191
  },
189
192
  signal: merged.signal ? AbortSignal.any([
190
193
  merged.signal,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@obelism/content",
3
3
  "description": "Obelism Content SDK: the delivery API client, the visual editor bridge with prompt editing, editing on your own site, webhook verification, and the content model CLI",
4
- "version": "0.15.0",
4
+ "version": "0.16.0",
5
5
  "keywords": [
6
6
  "cms",
7
7
  "headless-cms",