Skip to content

Content-Type: application/csp-report [improvement Request] #1024

Description

@zaterio

Thanks for the excellent work and the new improvements!!

I am capturing CSP reports via eve. However, the specification is not evenly adopted among the User-Agents.
For example some user-agents (Safari, Chrome) makes posts with: Content-Type: application/csp-report, In this case eve responds:

{"_status": "ERR", "_error": {"message": "Unknown or no Content-Type header supplied", "code": 400}}

(Not allowed in eve/methods/common.py )

In other cases, the user agents post with: Content-Type: application/json, and eve responds with 201.

MDN specification indicates that the format for csp reports is always json.

I would like to request the improvement, which allows the content-type "application/csp-report" to be treated such as "application/json", in eve/methods/common.py.

Regards.

Ref: github/secure_headers#79

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions