Home > Net >  Static HTML files by $. GetJSON access.net core webapi interface to cross domain problem
Static HTML files by $. GetJSON access.net core webapi interface to cross domain problem

Time:12-08

Access to the XMLHttpRequest at 'http://localhost:8066/api/app/XXXXX' from origin 'null' has had been blocked by CORS policy: No 'Access - Control - Allow - origin' header is present on the requested resource
API interface configuration cross domain, so the HTML is deployed to the IIS no problem, but direct double-click the HTML would be an error, could you tell me how to get bosses?

PS: the static files mainly shows highcharts chart, first contact with the android development, using the android several chart controls, the effect is bad, then I think of with HTML static files to show the effect of, also is the most easy to implement, but will appear this kind of cross-domain problem
  • Related