0

I am running on my localhost and then I submitted the form to a remote url. So, the procedure will be the following:

  1. Submit a form from localhost
  2. It will be redirected to remote URL
  3. from Remote URL, it will send a response back to the localhost

I can retrieve the localhost header response.

mounted(){
     window.axios.get('http://localhost:8080')
        .then(function (response) {
          console.log(response.headers)
        })
}

But, the response data is not correct since it is the data inside the localhost header. What I want is to retrieve the header response from remote(web) url. So, I changed the URL window.axios.post('remote_url')

But the problem is, there is a CORS privacy error.

enter image description here

I want to get the order_id. Is there a way to do this?

smzapp
  • 809
  • 1
  • 12
  • 33

1 Answers1

1

you need to allow CORs in your remote server check here

for more info. Also, check this Answer

Stanley
  • 499
  • 1
  • 7
  • 15