How to use Unleash Feature server from browser (React project)

1.4k Views Asked by At

I am trying to use unleash feature toggle for my React Project. It is running fine for backend server(java sdk is availble). But I cant make unleash request from browser(I am using React as a front end technology). After go through their git repository I came to know there is unleash proxy concept which allow us to use toggles from browser. When I try to connect from browser through proxy it is giving CORS problem. Please suggest me how to set CORS header to unleash server which is running in docker container.

1

There are 1 best solutions below

0
On

To use Unleash in frontend and native applications it is recommended to use the Unleash Proxy together with a proxy SDK https://docs.getunleash.io/sdks/unleash-proxy

The proxy will make sure you don't expose internal toggle configurations to end users and is extremely scalable.