Skip to content

Optionally allow unknown RW request content type#7293

Open
yeya24 wants to merge 4 commits intocortexproject:masterfrom
yeya24:fix-input-type
Open

Optionally allow unknown RW request content type#7293
yeya24 wants to merge 4 commits intocortexproject:masterfrom
yeya24:fix-input-type

Conversation

@yeya24
Copy link
Contributor

@yeya24 yeya24 commented Feb 24, 2026

What this PR does:

We had a recent change that returns 415 if the remote write content type is invalid #7238. This aligns with the standard Prometheus behavior as Prometheus doesn't allow non standard content type in the request as well.

However, this can be considered a breaking change in Cortex as existing remote write requests with different content type header can stop working and return 415. This can happen for users with custom remote write implementations.

To not break existing functionalities, add a flag to allow accepting unknown content type and fallback to Remote write v1.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

… type and treat as remote write v1

Signed-off-by: yeya24 <benye@amazon.com>
Signed-off-by: yeya24 <benye@amazon.com>
Signed-off-by: yeya24 <benye@amazon.com>
Signed-off-by: yeya24 <benye@amazon.com>
Copy link
Member

@SungJin1212 SungJin1212 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/distributor lgtm This PR has been approved by a maintainer size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants