-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Device blocked by CORS policy #249
Comments
|
I have found part of the issue, On chrome linux enabling chrome://flags/#enable-experimental-web-platform-features (needed for web-bluetooth support on linux) will cause the errors. |
I ended up having to directly view https://meshtastic.local/ as https://client.meshtastic.org/ doesn't work because of the CORS policy. |
I haven't attempted reproducing this yet, but FWIW meshtastic/firmware#652 started and meshtastic/firmware#656 added CORS support, albeit the |
CORS headers should be present, as far as I can tell, from the node. I believe the issue is the |
Device: Linux Native, running in docker, with port 4430 forwarded to container port 443 (TLS) Firefox dev console Network tab shows request PUT /api/v1/toradio with "CORS Missing Allowed Origin". Debugging using curl:
but it is present on GET /:
|
Ran meshtasticd under gdb, with breakpoint on handleAPIv1ToRadio, when sending method PUT, the breakpoint is hit. When sending method OPTIONS, the breakpoint is not hit. |
Backtrace at handleAPIv1ToRadio:
Ah looks like there's a second set of handlers for native platform (src/mesh/raspihttp/PiWebServer.cpp):
and no endpoint for OPTIONS method. Needs a patch like this:
FYI @jp-bennett |
Hardware
T-Beam, T-Deck, DIY
Connection Type
HTTP
Local or Hosted
https://client.meshtastic.org
Firmware Version
2.3.10.d19607b
Description
When connecting to a device with https://client.meshtastic.org I will get a CORS violation.
It happens with both http (meshtasticjs and slippy app with device added to chrome://flags/#unsafely-treat-insecure-origin-as-secure) and https.
This also wasn't happening about a week ago.
My browser is:
Chromium Version 126.0.6478.61 (Official Build) (64-bit)
Relevant console output
The text was updated successfully, but these errors were encountered: