javascript - 403 Forbidden in Vue.js + CodeIgniter 4

one text

Solution:

Could you check to see if your POST requests also includes cookies (in developer tools > network tab)? It's a fairly common problem that fetch/xhr libraries (like this.$http) do not send credentials (cookies) by default. If the cookies are missing from your, you can enable sending credentials by:

Vue.http.options.credentials = true;

Assuming you are using Vue-resource (this.$http)

Source