Problem with Axios headers | Application = Laravel + vue.js

0

I'm trying to make a request with axios, but I can not always get the following error:

admin:1 Failed to load http://minhaurlencurtada: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://mv.test' is therefore not allowed access.

I have tried to put the headers directly in the axios but I did not succeed, when the request is made via php I have no problems so I dropped problems on the server, but after a lot of search and attempts with headers, I downloaded an extension in the chrome browser that called "Access-Control-Allow-Origin", it worked normally without the error, there I discarded the parameters passed in the url, now I have my doubts what it takes to make a request to an api from within a component Vue.js ?

    
asked by anonymous 01.08.2018 / 00:29

0 answers