Skip to content

application: CORS allowed headers expanded to include X-Request-Id - #8

Open
birnam wants to merge 1 commit into
Snapmaker:mainfrom
birnam:bugfix-cors-header-allows-x-request-id
Open

birnam wants to merge 1 commit into
Snapmaker:mainfrom
birnam:bugfix-cors-header-allows-x-request-id

Conversation

@birnam

@birnam birnam commented Sep 19, 2026

Copy link
Copy Markdown

Snapmaker Orca, starting with PR#704 and released in v2.3.6, asks for X-Request-Id as an allowed header in the exploratory OPTIONS request. That is not defined in u1-moonraker Access-Control-Allow-Headers, causing the CORS enforcement to fail in the browser engine that runs the 'Upload' and 'Upload and Print' Snapmaker Orca dialogs.

The result is a confusing error message for the user, mentioning XMLHttpRequest and CORS but not giving any particularly helpful information. See Issue #7 for a full description with more images.

Assuming the X-Request-Id was added to Snapmaker Orca with good reason, the correct fix will be to udpate the moonraker code to allow that header. This fix is confirmed by replicating the change in-situ. This can be done on machines running firmware that allows SSH by directly editing /home/lava/moonraker/moonraker/components/application.py and restarting moonraker.

Upload Dialog Error

cors-error-upload

Snapmaker Orca, starting with PR#704 and released in v2.3.6, asks for
X-Request-Id as an allowed header in the exploratory OPTIONS request.
That is not defined in u1-moonraker Access-Control-Allow-Headers,
causing the CORS enforcement to fail in the browser engine that runs the
'Upload' and 'Upload and Print' Snapmaker Orca dialogs.

The result is a confusing error message for the user, mentioning
XMLHttpRequest and CORS but not giving any particularly helpful
information. See [Issue
Snapmaker#7](Snapmaker#7) for a full
description with images.

Assuming the X-Request-Id was added to Snapmaker Orca with good reason,
the correct fix will be to udpate the moonraker code to allow that
header. This fix is confirmed by replicating the change in-situ. This
can be done on machines running firmware that allows SSH by directly
editing /home/lava/moonraker/moonraker/components/application.py and
restarting moonraker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant