Full API proxy demo — query Contentful entries through the edge proxy with credentials hidden from the client and asset URLs rewritten.
Integration
Drop this fetch adapter into your Contentful client. All matching CMS requests are transparently routed through the API proxy.
Open Contentful Playgroundimport { createCmsAssetsFetch } from '@synchronized-studio/cmsassets-core'
import { createClient } from 'contentful'
const cmsFetch = createCmsAssetsFetch({
tenant: 'demo-contentful',
provider: 'contentful',
providerConfig: {
spaceId: 'abc123',
},
})
const client = createClient({
space: 'abc123',
accessToken: '', // token is injected server-side by the proxy
adapter: cmsFetch,
})
const entries = await client.getEntries({ content_type: 'page', limit: 3 })URL Rewriting
The SDK intercepts CMS requests and rewrites the URL to your tenant proxy domain. The edge worker then fetches the upstream API, injects credentials, caches the response, and rewrites asset URLs before returning.
Live
Hit the button to send a real request through the Orinami edge proxy. The response shows the JSON with rewritten asset URLs highlighted.