how to avoid Cross-Origin Read Blocking (CORB)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
rembo
User
Posts: 227

how to avoid Cross-Origin Read Blocking (CORB)

Post by rembo »

hello ..
am try to get Video data from API App on another host , like that :

$.ajax({  
   url:'https://my_second_host.com/project/api/list/videos
   method:'GET',  
   dataType:'json',
   responseType:'application/json',
   success:function(rander , textStatus, xhr) {    
      if(rander && rander.success){
        console.log(rander);
      }
   }
 });

but I got an error console massege says :
Cross-Origin Read Blocking (CORB) blocked cross-origin response https://my_second_host.com/project/error with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.
how can I avoid this console error ?
Thnx ....


arbei
User
Posts: 9292

Post by arbei »

rembo wrote:

responseType: 'application/json'
vs.
Cross-Origin Read Blocking (CORB) blocked cross-origin response
https://my_second_host.com/project/error with MIME type text/html

Make sure your API returns JSON or make sure the response type matches the API's.


Post Reply