How to use Bootstrapping with Svelte? #9118
-
I'm using Node.js on the backend for the Svelte client for the frontend. I now want to integrate bootstrapping for
Am I right that the backend provides the dynamic bootstrap data to the frontend? Is there a way to do so? I found |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The API format for the backend and frontend SDKs are different, because we don't want to leak feature flag configuration down to the client side. This data may contain sensitive information that you don't want clients to be able to access. Therefore a design decision was made early on that the frontend SDKs only receive evaluated feature flags, to avoid leaking the configuration and also reduce the amount of data transferred over the wire downstream to the connecting clients. What you need to do in this case is to use the Node SDK to transform the feature flags into a format that the frontend SDK will understand. I have an example here using the unleash-proxy. The proxy is now deprecated in favor of unleash-edge, but the logic is still relevant here. Let me know if that solves your problem. |
Beta Was this translation helpful? Give feedback.
@JE4GLE
The API format for the backend and frontend SDKs are different, because we don't want to leak feature flag configuration down to the client side. This data may contain sensitive information that you don't want clients to be able to access. Therefore a design decision was made early on that the frontend SDKs only receive evaluated feature flags, to avoid leaking the configuration and also reduce the amount of data transferred over the wire downstream to the connecting clients.
What you need to do in this case is to use the Node SDK to transform the feature flags into a format that the frontend SDK will understand. I have an example here using the unleash-proxy. The proxy is now dep…