U
U
Umid2019-01-03 15:02:43
CORS
Umid, 2019-01-03 15:02:43

Access issue when requesting with axios "Access to XMLHttpRequest at ... has been blocked by CORS policy: ..."?

When a request is made to the api server, the following is returned:
5c2df8a48cd5c352350522.png
I send the request as follows:

this.$axios.post('/feedback', {
          username: state.modals.feedback.username.value,
          email: state.modals.feedback.email.value,
          message: state.modals.feedback.message.value,
          feedbackType: "FEATURE_REQUEST"
        }, {
          headers: {
            'Content-Type': 'application/json'
          }
        })

BaseUrl: https://intelinvest.ru/api/
But if you make the same request via Postman, then there are no problems with access:
5c2df92fa4c4b593565223.png
Headers are the same, 'Content-Type': 'application/json'
What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2019-01-03
@DarCKoder

Read about CORS . You won't be able to do this from a browser. Well, if this service does not change the settings. And he won't do it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question