-1

I am using Place API from google, But getting error CORS

I am using fetch javascript API React JS

ZeevhY Org.
  • 295
  • 3
  • 8
  • Does this answer your question? [Sending a details request to Google Places API - (CORS error)](https://stackoverflow.com/questions/38542306/sending-a-details-request-to-google-places-api-cors-error) – Linda Lawton - DaImTo Jun 20 '22 at 07:28

1 Answers1

1

I think it's a duplicate question and you can find complete answers in this StackOverflow post

also, you can read about cors error here, in a simple explanation, Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources.

Basically, this is a configuration to web server API and you should fix the problem there, but there is something you can try out for the front-end development local environment you can use this extension if you are using chrome and this for firefox, they simply add some headers to requests and responses to pass cors error. there are some other solutions to this you can find in the post I mentioned above

Alireza Zarei
  • 314
  • 1
  • 4
  • 10