Hey guys , i've buiding one kmp app for all platform its works fine in all expect web , I used js for web , I was using compose image loader to load images from network . It is showing error in console
Access to fetch at '
' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
This error is there only for web platform. can anyone help?
CORS is an in-browser feature to protect users from attacks in which an attacker is able to execute code on their machine that tries to imitate a website. It doesn't exist in non-browser environments, which is why it only fails on the web platform.
m
Myroslav Kolodii
01/27/2025, 4:03 PM
Hi, I've just faced the same issue. Since web app runs on local web server, which is launched via
wasmJsBrowserRun
gradle task, I wonder how to update its configuration to allow CORS?
c
CLOVIS
01/27/2025, 5:35 PM
Ask in #CDFP59223, but you'll need to provide more info (what resource are you trying to access? which technology is hosting it?)