How can I fix the access to XMLHttpRequest at... from origin 'null' has been blocked by CORS policy: ... with NO access to the server side
.
I am working on a project, and part of it requires me to scrape for some information off of a specific page.
Now, this URL can only be accessed if I am connected to the network of my workplace.
The following is the code I am using in order to scrape:
let axios = require('axios');
let cheerio = require('cheerio');
axios.get("---the url that I want---")
.then((response) => {
if(response.status === 200) {
// sucsessfull call to get
const html = response.data;
const $ = cheerio.load(html);
const jobTable = $('#tbl_JobInfo');
const table = jobTable.find('table');
console.log(table.text());
}
}, (error) => console.log(err) );
However, when using this I get the following error:
Access to XMLHttpRequest at '---the url that I want---' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I've done a lot of searching online and understand this is a CORS issue, but I have no access to change headers on server side.
Is there any way I can work around and gain access to information on this page, as I am connected to the network of the workplace?
Thanks