I’m trying to pull some simple json information from an API using a WebApp widget.
When executing the HTTP request, I get the following error:
03-22 14:07:38.215 : Warning / Starfish ( 3643 : 4113 ) : 1.0.0/200925_a4c06d3: Failed to load http://geosearchef.de:31100/api/city?c=M%C3%BCnchen_Stadt : request doesn't pass CORS check, please check Access-Control-Allow-Origin header in reponse 03-22 14:07:38.219 : Error / Starfish ( 3643 : 3643 ) : 1.0.0/200925_a4c06d3: console.error: Error while requesting data
I got this in the config:
<access origin="*" subdomains="true"/> <tizen:privilege name="http://tizen.org/privilege/internet"/>
When opening the same webpage using Firefox, the cross origin request works (after setting the correct headers on the server, before that it didn’t). I can see the following headers being returned by the server on both Firefox and Chrome:
HTTP/1.1 200 OK Date: Tue, 22 Mar 2022 13:09:57 GMT Content-Type: application/json Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE, OPTIONS Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token Transfer-Encoding: chunked Server: Jetty(9.4.z-SNAPSHOT)
Anybody got an idea what is causing the issue and how I could work around it?