-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORS policy #11
Comments
No, this is not an error with this package, this is an intended feature of browsers called the Same-Origin Policy. It is critical for protecting sensitive user information. From a normal webpage context it is not possible to use this package, it can be used from a a browser extension background script or an Electron project though. |
For an example of usage in a browser extension see here |
Thankst to answer, I'll check it. |
I'm using ReactJs.
When I use the request example. I'm getting CORS error.
That code return
Access to fetch at 'https://translate.google.com/' from origin 'http://localhost:5173' 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.
Is that an API error or I need to use some param on the request
translate()
?The text was updated successfully, but these errors were encountered: