diff --git a/app/api/edgestore/[...edgestore]/route.ts b/app/api/edgestore/[...edgestore]/route.ts index 4078f04..5cb82f8 100644 --- a/app/api/edgestore/[...edgestore]/route.ts +++ b/app/api/edgestore/[...edgestore]/route.ts @@ -5,7 +5,7 @@ import { createEdgeStoreNextHandler } from "@edgestore/server/adapters/next/app" import { EdgeStoreProvider } from "@edgestore/server/providers/edgestore"; import getConfig from "next/config"; -const { serverRuntimeConfig } = getConfig(); +const { publicRuntimeConfig } = getConfig(); const es = initEdgeStore.create(); @@ -19,8 +19,8 @@ const edgeStoreRouter = es.router({ const handler = createEdgeStoreNextHandler({ router: edgeStoreRouter, provider: EdgeStoreProvider({ - accessKey: serverRuntimeConfig.edgestoreAccessKey, - secretKey: serverRuntimeConfig.edgestoreSecretKey, + accessKey: publicRuntimeConfig.edgestoreAccessKey, + secretKey: publicRuntimeConfig.edgestoreSecretKey, }), }); diff --git a/next.config.js b/next.config.js index 746d4c9..8f418a2 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - serverRuntimeConfig: { + publicRuntimeConfig: { // Will only be available on the server side edgestoreAccessKey: process.env.EDGE_STORE_ACCESS_KEY, edgestoreSecretKey: process.env.EDGE_STORE_SECRET_KEY,