Reject OPTIONS requests with a body#96357
Conversation
|
To reviewers:
So it's funkier than I expected. |
|
Pinging @elastic/es-security (Team:Security) |
|
Pinging @elastic/es-distributed (Team:Distributed) |
jakelandis
left a comment
There was a problem hiding this comment.
LGTM.
I originally thought this might be a breaking change but now I am pretty sure it is not breaking in a way anyone would ever notice. I spent some time understanding CORS preflight requests (the primary workflow for unauthenticated OPTIONS call) and since the Browser typically makes that call and there is no reason for it send a body we can be pretty confident they don't. Similarly, JS library don't really have a reason to make the preflight call but if they do I could not find any evidence to why they might include a body.
Also the RFC does not allow for bodies in OPTION requests. Most server implementations would already be rejecting this. |
Instead of not authN and letting them through, this PR rejects OPTIONS requests with a body (400). Relates elastic#95112
Instead of not authN and letting them through, this PR rejects OPTIONS requests with a body (400).
Relates #95112