prusa3d / Prusa-Link-Web

Prusa Web interface resources
GNU General Public License v3.0
117 stars 50 forks source link

Access-Control-Allow-Origin: * #391

Open letshin opened 1 year ago

letshin commented 1 year ago

When calling the /api/printer api I am getting the following error:

Access to XMLHttpRequest at 'http://xxx/api/printer' from origin 'http://yyy:111' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Can the response header of /api/printer to Access-Control-Allow-Origin: * or add an option for this to by pass this error please as using a proxy for this is tedious?

Reference: link

Thanks.

ondratu commented 1 year ago

Hi, you are right. At this moment, we not set any CORS headers at this moment. I add your request to our TODO list.

Thanks for your favor.