Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

How to use the CDN in a query string for the frontend.

3 replies
Last updated: Aug 25, 2023
This is my current query string from the frontend. How do I make it use the CDN?
// Compose the URL for your project's endpoint and add the query
let URL =
https://${PROJECT_ID}.<http://api.sanity.io/v2021-10-21/data/query/${DATASET}?query=${QUERY}|api.sanity.io/v2021-10-21/data/query/${DATASET}?query=${QUERY}>
Aug 25, 2023, 3:47 PM
👋 You’d instead use:
<http://apicdn.sanity.io|apicdn.sanity.io>
. More on that here .
Aug 25, 2023, 5:23 PM
Thank you!
Aug 25, 2023, 5:31 PM
You’re welcome!
Aug 25, 2023, 5:48 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?