mhladnik
mhladnik
NNuxt
Created by mhladnik on 4/26/2024 in #❓・help
Create global instance of ofetch
I want to create a global ofetch instance, on which I can add custom header and I want it to be present on all $fetch and useFetch calls from. What is the best way to do this, if it is even possible?
3 replies
NNuxt
Created by mhladnik on 4/22/2024 in #❓・help
Programatically change Content Security Policy (CSP) on specific page
Hello, I want to programatically add more links to CSP on one specific page and I need to fetch those links from DB. I tried to use useHead composable on both said page and on middleware before navigating to it. In both cases it didn't work, even though I could see updated header if I inspected it. So I assume there is some race condition that I didn't take into account. Is there correct/better way to do it, or any advice what I can try to make it work?
2 replies