I'm using GimmeProxy api to get a proxy that I want to use in my vue chrome extension. Unfortunately I get this error:
Access to XMLHttpRequest at 'https://gimmeproxy.com/api/getProxy?get=true&supportsHttps=true&anonimityLevel=1&protocol=http' from origin 'chrome-extension://eamofepokjbdhndoegnmcnmgjhefhhlh' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
This is the code I have in my vuex action:
fetchProxyData({ commit }) {
axios({
method: 'get',
baseURL: 'https://gimmeproxy.com/api/getProxy',
params: {
get: true,
supportsHttps: true,
anonimityLevel: 1,
protocol: 'http'
},
headers: {
'Access-Control-Allow-Origin': '*'
}
}).then( (response) => {
console.log(response)
})
Is there a way to fix this?