Skip to content
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 error #39

Closed
DreamerKamyar opened this issue Dec 12, 2023 · 4 comments
Closed

CORS policy error #39

DreamerKamyar opened this issue Dec 12, 2023 · 4 comments

Comments

@DreamerKamyar
Copy link

DreamerKamyar commented Dec 12, 2023

i installed your package and tried the description but unfortunately i get errors about CORS error, and i don't know how to solve it

@AidanWelch
Copy link
Owner

I'm sorry to hear that but am a little confused, if you know how to solve it what's the problem?

@DreamerKamyar
Copy link
Author

sorry i made a mistake in writing about it
Access to fetch at 'https://translate.google.com/_/TranslateWebserverUi/data/batchexecute?rpcids=MkEWBc&source-path=%2F&f.sid=&bl=&hl=en-US&soc-app=1&soc-platform=1&soc-device=1&_reqid=2982&rt=c' 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.

this is the error i got from it

@AidanWelch
Copy link
Owner

@DreamerKamyar

Ah okay, unfortunately in some cases this is unavoidable. More information here.

But essentially, it is not possible to use this package in the front end of a website because of the Same Origin Policy.

@DreamerKamyar
Copy link
Author

oh that was the reason I couldn't use it in front end.
thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants