ton-connect/sdk

Access to resource at 'https://connect.tonhubapi.com/tonconnect/events?client_id=e23a2bdca0189e5cd7d6e38f5cda1f899dfcc5d66843c6de0aee46500fb784437' from origin 'https://telegram-gaaming-app.vercel.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

iftekharalammithu opened this issue · 3 comments

Describe the bug

I Set the the code as Documentation the app is working good the Payments and transactions are also working great. but when i inspect the app i figure out This Error Continuously Show up

Access to resource at 'https://connect.tonhubapi.com/tonconnect/events?client_id=e23a2bdca0189e5cd7d6e38f5cda1f899dfcc5d66843c6de0aee46500fb784437' from origin 'https://telegram-gaaming-app.vercel.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is there any Way to Fix This .
My Application Is in Reactjs Vite

Expected behavior

The Error show This "blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource." I Think i Have to config my Domain in @tonconnect/ui-react Library. But How can i do that?

Current behavior

I Did lots of things as per research in google but not successful

Steps to Reproduce

  1. make a app in Reactjs Vite
  2. Add Payment Features @tonconnect/ui-react and @ton
  3. after that if open Inspect you will find the Error

Environment

Brave Browser

Additional context

No response

Same issue here
any solutions

Same issue here any solutions

After researching, I discovered that in the same project, the <script src="https://telegram.org/js/telegram-web-app.js"></script>. And @telegram-apps/sdk cannot be used.

not using

<script src="https://telegram.org/js/telegram-web-app.js"></script>

only using @tonconnect/ui