Asset proxy demo — serve Cloudinary images and videos through your tenant domain with edge caching and bandwidth control.
Integration
Drop this fetch adapter into your Cloudinary client. All matching CMS requests are transparently routed through the API proxy.
import { createGenericProvider, createCmsAssetsFetch } from '@synchronized-studio/cmsassets-core'
const cloudinary = createGenericProvider({
id: 'cloudinary',
apiHosts: [],
assetHosts: ['res.cloudinary.com'],
})
const cmsFetch = createCmsAssetsFetch({
tenant: 'demo-cloudinary',
provider: cloudinary,
})
// Asset URLs are rewritten to your tenant domain automatically.
// Cloudinary transformation params are preserved.
const response = await cmsFetch(
'https://res.cloudinary.com/demo/image/upload/w_800/sample.jpg'
)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.