diff --git a/.nais/nais.yaml b/.nais/nais.yaml index b92ef7a..76e3d0b 100644 --- a/.nais/nais.yaml +++ b/.nais/nais.yaml @@ -79,7 +79,7 @@ spec: accessPolicy: outbound: external: - - host: rt6o382n.api.sanity.io + - host: rt6o382n.apicdn.sanity.io - host: graph.microsoft.com - host: login.microsoftonline.com - host: saf.dev-fss-pub.nais.io diff --git a/app/entry.server.tsx b/app/entry.server.tsx index 7cf9846..2787797 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -27,7 +27,7 @@ const csp = { "connect-src": [ "'self'", "*.nav.no", - "rt6o382n.api.sanity.io", + "rt6o382n.apicdn.sanity.io", "https://telemetry.ekstern.dev.nav.no/collect", "https://telemetry.nav.no/collect", "cataas.com/cat/gif", diff --git a/app/sanity/sanity-client.ts b/app/sanity/sanity-client.ts index 5cdf9bf..b68cfc3 100644 --- a/app/sanity/sanity-client.ts +++ b/app/sanity/sanity-client.ts @@ -3,7 +3,7 @@ import { createClient } from "@sanity/client"; export const sanityConfig = { dataset: process.env.SANITY_DATASET || "development", projectId: process.env.SANITY_PROJECT_ID || "rt6o382n", - useCdn: false, + useCdn: process.env.NODE_ENV === "production", token: process.env.SANITY_ACCESS_TOKEN || "", apiVersion: "2022-03-07", };