Mosayyeb
Private API to fetch data from server on page load or navigation without exposing api to the client
Hello,
Is it possible to have a completely private API in Nuxt without exposing public server API?
We have a page called
example.vue
and we want to load data from the server when the client navigates to the page for the first time. All fetching processes should be on the server side, and the private API should not be visible to the clients.
we don't want to create server/api/get-data-from-external-api.ts
because anyone can hit this endpoint.
Any ideas?3 replies