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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

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