Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
luojiandan_bi
Helper I
Helper I

'Access-Control-Allow-Origin'

I need to get data from url,but get error:

```javascript

Access to XMLHttpRequest at 'https://gallerybox.makeapie.com/asset/get/s/data-1592366734603-Z-iQwIHJk.json' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

```

what's wrong with me?

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @luojiandan_bi,

Visuals have their domain removed by the main window so that they are sandboxed. One of the effects of this is that if you're attending to load data from an external URL and this site does not allow requests from an empty domain, they are blocked by your browser. This is a common use case for creators in the HTML Content visual, so I've written up a short overview here. This section and the one below it on CORS are worth understanding if you're developing visuals in Power BI - plus the linked articles that detail it further - as these cannot be overcome through conventional means.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

3 REPLIES 3
abanafa
New Member

I'm having the same problem did you find a solution?

luojiandan_bi
Helper I
Helper I

@dm-p 

thanks a lot,very useful replay.

dm-p
Super User
Super User

Hi @luojiandan_bi,

Visuals have their domain removed by the main window so that they are sandboxed. One of the effects of this is that if you're attending to load data from an external URL and this site does not allow requests from an empty domain, they are blocked by your browser. This is a common use case for creators in the HTML Content visual, so I've written up a short overview here. This section and the one below it on CORS are worth understanding if you're developing visuals in Power BI - plus the linked articles that detail it further - as these cannot be overcome through conventional means.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors