validate-vat icon indicating copy to clipboard operation
validate-vat copied to clipboard

CORS error

Open Stelikas opened this issue 2 years ago • 2 comments

Trying to validate a VAT number and i get this CORS error:

Access to fetch at 'https://ec.europa.eu/taxation_customs/vies/services/checkVatService' from origin 'https://domain.test' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Stelikas avatar Jun 04 '22 09:06 Stelikas

Hi @Stelikas,

I'm facing the same issue. it used to work fine but not I get this error.

Do you manage to figure anything out?

Thanks in advance

deibizide avatar Aug 10 '22 18:08 deibizide

Hey @deibizide

Not really, to avoid CORS issues, 90% of the time you have to do the request from the server (at least in my experience), so i used a server-side package for PHP which is my back-end language and it did the trick.

Stelikas avatar Aug 16 '22 12:08 Stelikas