Hi guys, I am working on a NextJS project. Due to ...
# ask-questions
n
Hi guys, I am working on a NextJS project. Due to legal requirement, I want to avoid the client side sdk to fetch feature definitions from growthbook’s cdn. I stored the feature definition locally in the filesystem, and the growthbook instance is initialized with the definitions during SSR. However when the code is sent to client’s browser, I still see the sdk fetching the definitions from CDN again. Any idea?🙏
i also set the polyFills like this during
getGrowthbookSSRData
, not sure if it’s relevant:
Copy code
setPolyfills({
    fetch: globalThis.fetch,
    EventSource: globalThis.EventSource,
    SubtleCrypto: globalThis.crypto?.subtle
  })
s
It probably depends on where you are loading the SDK. There should be ways around preventing it from reaching the client. One way I can think of is to use a Next.js route handler