Tuc Grefico
Separate API endpoints for SSR/CSR for useFetch
Hey, I need to specify different API endpoints depending on whether the request is coming from the server or the client (server needs to use internal Kube addresses) for useFetch.
I've tried using a ternary with process.client in the url, which works in theory, but because of its reactivity the API call is always run as soon as the page loads, which obviously defeats the purpose of SSR loading times and causes a flicker effect.
Is there any way to fix this, or another approach I could use? Thanks
1 replies