Getting Cross-Origin Read Blocking (CORB) error

952 views Asked by At

I have called this API using Jquery AJAX. I am getting following error in console:

> assets.min.js:3 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://lrimsfaoaf.ait.ac.th/geoserver/wfs?format_options=callback:handleJson&service=WFS&version=1.1.0&request=GetFeature&typename=geonode%3Adistrict_boundaries&CQL_FILTER=Prov_Name%3D%27Badghis%27&srsname=EPSG%3A4326&outputFormat=text%2Fjavascript&_=1608092744277 with MIME type application/xml. See https://www.chromestatus.com/feature/5629709824032768 for more details.
send @ assets.min.js:3
ajax @ assets.min.js:3
$.ajax @ assets.min.js:3
handleAjax @ leafletControl.js:265
(anonymous) @ zoomBasedOnLayer.js:21
dispatch @ assets.min.js:3
v.handle @ assets.min.js:3

Here's my ajax function:

function handleAjax(column, value, adminUnit = "AFG_adm2") {
  $.ajax("https://lrimsfaoaf.ait.ac.th/geoserver/wfs", {
    type: "GET",
    data: {
      service: "WFS",
      version: "1.1.0",
      request: "GetFeature",
      typename: `geonode:${adminUnit}`,
      CQL_FILTER: `${column}='${value}'`,
      srsname: "EPSG:4326",
      outputFormat: "text/javascript",
    },
    dataType: "jsonp",
    jsonpCallback: "callback:handleJson",
    jsonp: "format_options",
  });
}

I have tried with CORS extensions but the issue is still there.

0

There are 0 answers