salomon_.
Explore posts from serversFetch only once on initial page load
I have an endpoint from my backend, with important data like seo, settings etc. I fetch it server side but I notice on navigation it refetch on client side, is there a way to prevent this? I want to fetch it only on first load.
20 replies
DTDrizzle Team
•Created by salomon_. on 2/24/2025 in #help
Is it possible to do this transformation using `db.query`?

1 replies
Server side fetch refetches on client 3 times
I call
useFetch()
in 3 components and when I do switch locale it refetches 3 times on client. Why? Shouldn't it cached after 1st call?
I followed recipe on nuxt docs so I got:
Custom fetch
Composable
API method
7 replies
How to manage 'remote' localization
Hello,
In my nuxt 3 app I get content in specified locale (using header) from CMS. So almost every component needs that data. What's the best way to manage it?
Fetch that data on server and store in pinia?
Or nuxt has an built in api to get cached data and I can use it?
Can i18n module helps in my scenario?
5 replies
Correct way to get cookie from the rest api
Hello, I am wondering what's the correct place to get
csrftoken
from backend rest api and send to the user? I use ssr, so I want to make it on server side. So in my attempt I created server/api/csrftoken.ts
where I get the token from backend, then created server/middleware/auth.ts
with the following content:
But it doesn't work, I got 500 error from the Nitro. Maybe there is a correct way?17 replies