zsilbi
zsilbi
NNuxt
Created by Sagar Kapoor on 10/2/2024 in #❓・help
Cookie consent banner for Google Analytics
It requires an external provider, I think I used CookieBot with this.
3 replies
NNuxt
Created by Sagar Kapoor on 10/2/2024 in #❓・help
Cookie consent banner for Google Analytics
3 replies
NNuxt
Created by Kyoko on 10/2/2024 in #❓・help
How to add headers into route middleware of Nuxt3
Hi! I'll also answer it here if others are looking for it:
import { setHeader } from 'h3';

export default defineNuxtRouteMiddleware((to) => {
if (import.meta.server) {
setHeader(useRequestEvent(), 'x-client', 'set in route middleware');
}
});
import { setHeader } from 'h3';

export default defineNuxtRouteMiddleware((to) => {
if (import.meta.server) {
setHeader(useRequestEvent(), 'x-client', 'set in route middleware');
}
});
2 replies
NNuxt
Created by Gawel91 on 2/20/2024 in #❓・help
Error only in production
try running node with the --inspect flag and you can use the node chrome inspector to watch what's happening
6 replies
NNuxt
Created by Medim on 2/20/2024 in #❓・help
Can't find auto import in slug route
just restart Volar within VSCode
12 replies
NNuxt
Created by Gawel91 on 2/20/2024 in #❓・help
Error only in production
6 replies