否';访问控制允许原点';请求的资源上存在标头。Firebase主机

否';访问控制允许原点';请求的资源上存在标头。Firebase主机,firebase,flutter,flutter-web,Firebase,Flutter,Flutter Web,我在Flitter web中有一个应用程序可以获取货币 我使用freeforexapi来获取结果,但是我得到了这个错误 访问位于“”的XMLHttpRequesthttps://www.freeforexapi.com/api/live?pairs=USDTRY“起源”https://kira-contract.web.app'已被CORS策略阻止:对飞行前请求的响应未通过访问控制检查:请求的资源上不存在'access control Allow Origin'标头 =============

我在Flitter web中有一个应用程序可以获取货币

我使用freeforexapi来获取结果,但是我得到了这个错误


访问位于“”的XMLHttpRequesthttps://www.freeforexapi.com/api/live?pairs=USDTRY“起源”https://kira-contract.web.app'已被CORS策略阻止:对飞行前请求的响应未通过访问控制检查:请求的资源上不存在'access control Allow Origin'标头

========================================================================

这是我的密码

 http.Response res = await http.get('https://www.freeforexapi.com/api/live?pairs=${pairs}',
        headers: {
          'Access-Control-Allow-Origin': "*",
          'Access-Control-Allow-Methods': 'GET, POST, PATCH, DELETE, PUT, OPTIONS',
          "User-Agen":
          "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36",
          "Accept": "application/json, text/javascript, */*; q=0.01",
          'Access-Control-Allow-Headers': 'Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With',
          'Access-Control-Allow-Credentials' : 'true',

        });
    if(res.statusCode == 200){
      print(res.body);
    }else{
      print('error');
    }