No the error is the same…actually i don´t have no idea anymore
@twestrick you can try it by your own, it does not work for local urls. I get also a error object back.
I am not sure. As @julio-ionic mentioned above, your last screenshot shows https
- https://192.168.10.26:2888
.
I am using androidScheme: 'http'
with the network_security_config
allowing clear text for my local dev backend API server without any issues. I also don’t use CapacitorHttp
but just normal JS fetch / XMLHttpRequest
. I would only use CapacitorHttp
if a third party service library required it to get around CORS. Otherwise, if you control the backend server, just set the proper headers to allow CORS.
hi dear , have you solved this error or not yet ? i you did , plz let me know how and thank you
Iike the OP I have a json server on my local lan (only) which serves config info for the app running on the server. my Ionic Vue app is just a form filler, the data is insignificant, containing no PII.
the server runs http… never accessed via internet.
but I get this error on Android now (app was first built on Android as first ionic app in 2018)
Line 202 - Msg: Mixed Content: The page at 'https://localhost/Slides' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://192.168.2.106:8099/tags'.
the server will NEVER be https…
I have tried the network_security config
I was able to override this issue on ios.
I also modified the capacitor.config.json (not using ts) by adding
,"server": {
"androidScheme": 'http'
}
ah, it gets overlayed as part of build… <----- the key
fixed my build script to add it back
don’t need the network_security config xml file