Reputation: 781
I use API Gateway on AWS.
First, I activated CORS option and send a request on axios, then it worked.
And I activated content-encoding and I added axios option
axios.defaults.headers.post['Content-Encoding'] = 'gzip'
Then CORS error occured.
How can I solve it?
Upvotes: 3
Views: 14609
Reputation: 751
Did you add correct headers directly to your axios POST ?
Maybe you could try
axios.post(your-url, {
headers: {
'Content-Encoding': 'gzip'
}
})
Upvotes: 5