Answer the question
In order to leave comments, you need to log in
Error Cannot set headers after they are sent to the client?
I am developing an application on vue.js, NUXT is used as SSR. The default component (rendered always) uses type checking
async created() {
const isToken= this.$cookies.get('token_auth');
if (isToken) {
this.$axios.defaults.headers.Authorization = `JWT ${token}`;
await this.doSometThing(); ( запрос в VueX)
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question