Hello,
I hope this is the right place for this. I am running into a CORS (Cross-Origin Response Sharing) error that only appears if I boot the device without a network cable attached. Booting with one attached does not have the issue. In order to resolve the issue, a reboot with cable attached or restarting the local apache webserver is needed. These are devices out in the field, and boot into a custom kiosk Electron webapp, so regular users will not have access to do these things.
At first I thought this may be an Electron/Chromium issue, but I can install the exact same webapp on our 15.1 build and it doesn’t have this issue.
My setup:
Device running openSUSE 15.3
A local apache webserver that calls an external domain when a user interacts with the webapp (like printing. I know, not really recommend)
Electron 18.2.3 (Chromium version 100)
Steps to reproduce:
Boot device with network cable unplugged
Plug in network cable
Refresh browser page
Try to run any interactive shell scripts - CORS error
Example of OK CORS header (network cable attached on boot):
https://i.imgur.com/xDMLqfb.png
Example of bad CORS header (missing ‘Remote Address’ section):
https://i.imgur.com/nL0Su7C.png
Error message from syslog:
https://example.net/kiosk/login.html:0: Access to XMLHttpRequest at 'http://localhost/ts.sh?FILE=https://example.net/kiosk/scripts/print.sh' from origin 'https://example.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Anybody know what the problem could be? Thanks for any help. I can provide more info if needed.