API data stored in JSON file inside in _next folder is exposed to anyone without any security ? Why?
Unanswered
Black imported fire ant posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
Black imported fire antOP
API data stored in JSON file inside in _next folder is exposed to anyone without any security or Login in Next.JS application. Why is that ? Does that not beat the purpose of extra security by BFF?
2 Replies
![Avatar](https://cdn.discordapp.com/avatars/678259999201427466/1936f7e8963ff0f800f5eb4b43bc833c.webp?size=256)
Clown
What even is BFF? Protecting any kind of route or asset is your own responsibility.
The things that happen inside route handlers and private environment variables(the variables not prefixed with NEXT_PUBLIC_) are the only two things that are protected.
The things that happen inside route handlers and private environment variables(the variables not prefixed with NEXT_PUBLIC_) are the only two things that are protected.
Heck even the stuff in route handler is only protected cause its code that runs only server side and only its response is returned.