Vitor
Vitor
NNuxt
Created by Vitor on 7/11/2024 in #❓・help
Middleware http-only cookies validation
thank you sooo much it was as easy as
const headers = useRequestHeaders(['cookie']);

try {
await $fetch('/api/auth', {
method: 'GET',
credentials: 'include',
headers,
});
const headers = useRequestHeaders(['cookie']);

try {
await $fetch('/api/auth', {
method: 'GET',
credentials: 'include',
headers,
});
3 replies