ckies

This user has not updated recently.

1 0 0 0
Forum Posts Wiki Points Following Followers

ckies's forum posts

Avatar image for ckies
ckies

1

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

So, I solved this problem by making my request in the backend. It's good practice to conceal your private API key in the backend, anyway. I built my backend using Spring Boot and in my controller class I used the global @CrossOrigin bean annotation to allow for cross-origin requests. Problem solved.
Stamp @CrossOrigin at the top of your Controller Class in a Spring Boot application, and you won't have to worry about CORS ever again!

Here's some info: https://spring.io/guides/gs/rest-service-cors/#:~:text=This%20%40CrossOrigin%20annotation%20enables%20cross,of%2030%20minutes%20is%20used.