You need to setup the correct domain for the CORS
But it works for GET (posts) and get users but not update content (post)
See if the post request has been enabled for CORS
how can I see that? i'm new to cors, its hard to debug when it works local but not on the server
Read the documentation for fruitcake/laravel-cors
When I read the docs I can't find info on what to change to get post to work . Do you know where to se an example on a Update with "post" have been used, with Nuxt/Passport? almost all examples are just GET
Now it works. :)
My post looks like:
const access_token = cookies.get('x-access-token'); this.$axios.setToken(access_token, 'Bearer') this.$axios.setHeader('Content-Type', 'application/json', [ 'post' ]) this.$axios .$post(process.env.LARAVEL_ENDPOINT + "/api/trials", { grant_type: 'authorization_code', client_id: 1, ..................
I also removed a / from /api/trials (is was /api/trials/)
I will try later to remove some of the code to see if it all have to be there.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You need to setup the correct domain for the CORS
But it works for GET (posts) and get users but not update content (post)
See if the post request has been enabled for CORS
how can I see that? i'm new to cors, its hard to debug when it works local but not on the server
Read the documentation for fruitcake/laravel-cors
When I read the docs I can't find info on what to change to get post to work . Do you know where to se an example on a Update with "post" have been used, with Nuxt/Passport? almost all examples are just GET
Now it works. :)
My post looks like:
I also removed a / from /api/trials (is was /api/trials/)
I will try later to remove some of the code to see if it all have to be there.