I was able to figure out the problem. My Angular application has an interceptor class that takes all my HTTP requests and inserts a JWT, as I have a Spring application on the backend that expects this in all requests.
However, this GET request I'm making is not for my backend, but for an external webservice. When I send this JWT in the GET request to the google endpoint, they complain and give this CORS problem.
I would then have two solutions:
1) Instead of making this GET request straight from my Angular application, do the backend, treat the data and then give it to the angular.
2) Prevent that particular HTTP call from passing through my interceptor. It was the solution I used because it was faster for me, using HttpBackend, so the request will not go through the interceptor:
private http: HttpClient;
constructor(handler: HttpBackend) {
this.http = new HttpClient(handler);
}
linkTabela = 'https://script.google.com/macros/s/AKfycbxk616n8wjgGeHZIc3Hm66Kcv4ZtWKZJQnEKLsxZC9LpoDK8mQZ/exec';
getTabela() {
return this.http.get<TabelaEstatistica>(this.linkTabela);
}