mardi 22 décembre 2020

vue devserver proxy not working, no CORS error but getting xhr response as a doc file

I have configured devserver proxy with my staging server url of my site, and made axios request using client server url. But the ajax request is returning just a html file, no response getting from server.

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, DELETE, PUT, PATCH, OPTIONS
Access-Control-Allow-Headers: token, Content-Type


axios

Axios({
            method: 'get',
            url: 'http://10.1.3.159/v3/se/oauth/getAccessToken.php',
            data: {}
          }).then(function (response) {
            console.log(response);
          });

vue.config.js

module.exports = {
    devServer: {
      proxy: 'server url'
    }
  }

These also added in php file headerxhr response



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire