All Demos

Prismic Demo

API Proxy

Full API proxy demo — fetch Prismic content through your tenant domain with server-side token injection and automatic asset URL rewriting.

Integration

Setup with createCmsAssetsFetch

Drop this fetch adapter into your Prismic client. All matching CMS requests are transparently routed through the API proxy.

Open Prismic Playground
Prismic + cmsassets-core
import { createCmsAssetsFetch } from '@synchronized-studio/cmsassets-core'
import * as prismic from '@prismicio/client'

const cmsFetch = createCmsAssetsFetch({
  tenant: 'demo-prismic',
  provider: 'prismic',
})

const client = prismic.createClient('my-repo', {
  fetch: cmsFetch,
})

// All API requests now go through your tenant proxy.
// Asset URLs in the response are rewritten automatically.
const page = await client.getByUID('page', 'home')

URL Rewriting

What happens under the hood

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

Run the proxy call

Hit the button to send a real request through the Orinami edge proxy. The response shows the JSON with rewritten asset URLs highlighted.