Skip to content

feat: ignore content-type for events#48

Open
pgaskin wants to merge 1 commit into
explodingcamera:mainfrom
pgaskin:lenient-event-content-type
Open

feat: ignore content-type for events#48
pgaskin wants to merge 1 commit into
explodingcamera:mainfrom
pgaskin:lenient-event-content-type

Conversation

@pgaskin

@pgaskin pgaskin commented Jul 6, 2026

Copy link
Copy Markdown

So it can be used with no-cors, which cannot send application/json, only text/plain.

Invalid JSON is still rejected.

This allows for /event requests without unnecessary OPTIONS pre-flight requests (that also needs changes to the tracker, but those can be done separately, and this doesn't break the existing tracker script).

So it can be used with no-cors, which cannot send application/json,
only text/plain.

Invalid JSON is still rejected.
@pgaskin

pgaskin commented Jul 6, 2026

Copy link
Copy Markdown
Author

Tested on my instance (with the original script, and with the fetch mode changed to no-cors and the Content-Type to text/plain).

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