API Proxy
Proxy Your CMS API Through One Edge Domain
Route all CMS API requests through your edge domain. Credentials are injected server-side, responses are cached globally, and asset URLs in JSON are rewritten to your domain automatically. Your frontend stays clean.
Credentials never reach the browser
Your CMS API token is stored server-side and injected at the edge. The frontend never sends a credential — no exposure risk, no client-side secrets.
Cached responses in under 10ms
API responses are cached globally with a configurable TTL. After the first request, repeat reads return instantly without hitting your CMS.
Asset URLs rewritten automatically
Image and file URLs in JSON responses are rewritten to your edge domain before your app sees them — no post-processing in every consumer.
Editorial preview just works
Preview requests bypass the cache automatically. Content editors always see the latest draft — no manual cache flushes needed.
How It Works
What happens on every API request
- 1Your app sends a
GETrequest toyour-project.cmsassets.com/~api/... - 2The edge checks the API cache. On a cache hit, the response is returned immediately — no upstream fetch.
- 3On a cache miss, your stored API token is injected and the upstream CMS is fetched on your behalf.
- 4Asset URLs in the JSON response are rewritten to your edge domain, then the result is cached and returned to your app.
For Developers
Integrate in Minutes with the Orinami SDK
Drop the SDK into your existing CMS client and all requests are routed through your edge domain automatically. No credential management on the client, no URL rewriting spread across your codebase.
What You Get
- - Drop in one fetch-compatible adapter — all matching CMS requests are proxied automatically
- - API requests and asset URLs routed through the same edge domain
- - Non-CMS requests pass through untouched — no accidental rewrites
- - Toggle API proxy and asset proxy on or off independently
- - Built-in support for Contentful and Prismic; generic provider for any other CMS
- - Works alongside the asset-only transformer if you need a lighter integration
Install
Add the package once and use the same helper for every supported CMS.
Copy command
npm install @synchronized-studio/cmsassets-coreUsage
import { createCmsAssetsFetch } from '@synchronized-studio/cmsassets-core'
import { createClient } from 'contentful'
const cmsFetch = createCmsAssetsFetch({
tenant: 'my-site',
provider: 'contentful',
providerConfig: {
spaceId: 'exampleSpaceId',
},
})
const client = createClient({
space: 'exampleSpaceId',
accessToken: '',
adapter: cmsFetch,
})
const entry = await client.getEntry('homepage')