Skip to content
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

Check Content-Type header for OPTIONS requests #428

Merged

Conversation

Flixt
Copy link
Contributor

@Flixt Flixt commented Sep 11, 2024

We encountered a problem when a client made an OPTIONS request, because committee does only validate the content type header for POST, PUT and PATCH requests.

The OpenAPI (3) schema for the endpoint looks like this:

MySchema:
  type: object
  required:
  - document_id
  properties:
    document_id:
      type: integer

The client left out the Content-Type header and sent and empty request body which did not lead to an Committee::InvalidRequest error.

Copy link
Member

@ydah ydah left a comment

Choose a reason for hiding this comment

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

Looks good for me.

@ydah ydah merged commit 61c918b into interagent:master Oct 9, 2024
6 checks passed
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.

2 participants