AgoraIO-Community / Agora-RTC-React

A react wrapper for Agora RTC NG SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blocked by CORS policy

DeepakSaini119 opened this issue · comments

Hi, I followed the tutorial from here. Except, according to this SO question, token based authentication is mandatory now. I enabled that by generating a token and giving the value(instead of null), but I still get the error:

Access to XMLHttpRequest at 'https://cds-ap-web-3.agora.io/api/v1?action=config' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

Am I missing something. TIA.

Hey @DeepakSaini119 this isn't a problem with this repo. You're getting CORS because you're trying to access the token from your localhost over HTTP. I'd recommend trying the same code with HTTPS instead.