[Vuejs]-Vue/nuxt3 project : (reason: cors header ‘access-control-allow-origin’ missing). status code: 200

0👍

I think you would be better served using the Google Maps client-side Distance Matrix Service.

I think that direct calls to the distancematrix endpoint are only allowed in server-side code.

See the answer here as I believe it may apply to the issue you are seeing:
Google Distance Matrix API returning CORS blockade

0👍

As CORS is a client side restriction, I believe that this api should be used by the server side. So the right way it to use API that designed for client side. Alternatively you can expose an API in your server that use that API, then call it from the client side.

Leave a comment