Unverified Commit b4089998 authored by Angelo Ashmore's avatar Angelo Ashmore Committed by GitHub

Use Prismic CDN URL in cms-prismic example (#26837)

The CDN URL is the recommended URL for the Prismic REST and GraphQL APIs.

## Documentation / Examples

- [x] Make sure the linting passes
parent a6965961
import Prismic from 'prismic-javascript' import Prismic from 'prismic-javascript'
const REPOSITORY = process.env.PRISMIC_REPOSITORY_NAME const REPOSITORY = process.env.PRISMIC_REPOSITORY_NAME
const REF_API_URL = `https://${REPOSITORY}.prismic.io/api/v2` const REF_API_URL = `https://${REPOSITORY}.cdn.prismic.io/api/v2`
const GRAPHQL_API_URL = `https://${REPOSITORY}.prismic.io/graphql` const GRAPHQL_API_URL = `https://${REPOSITORY}.cdn.prismic.io/graphql`
// export const API_URL = 'https://your-repo-name.cdn.prismic.io/api/v2' // export const API_URL = 'https://your-repo-name.cdn.prismic.io/api/v2'
export const API_TOKEN = process.env.PRISMIC_API_TOKEN export const API_TOKEN = process.env.PRISMIC_API_TOKEN
export const API_LOCALE = process.env.PRISMIC_REPOSITORY_LOCALE export const API_LOCALE = process.env.PRISMIC_REPOSITORY_LOCALE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment