πŸ‘€ See Sanity in action: Watch product demo now β†’

Can Authenticated Requests can use the CDN?

4 replies
Last updated: Mar 3, 2022
Hey
user T
, you said that authenticated requests can use the CDN, but the docs say something different:
β€’
Requests with
Authorization
headers are rejected, i.e. authenticated requests
See
https://www.sanity.io/docs/api-cdn
Are the docs outdated?
Mar 3, 2022, 12:16 PM
The docs are outdated. If you use >3.0 version of sanity client the apicdn caches authenticated requests, using the token as part of the cache key.
Mar 3, 2022, 12:46 PM
Thanks
user A
Mar 3, 2022, 12:49 PM
Good prompt to get the docs updated though, thanks for the catch πŸ˜‰
Mar 3, 2022, 12:59 PM
https://www.sanity.io/docs/api-cdn is updated, you can see if it makes more sense!
Mar 3, 2022, 1:50 PM

Sanity.io – build remarkable experiences at scale

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

Categorized in