Unable to get `json_body` when Content-Type is 'application/csp-report'
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
Currently the only time you can retrieve the `Request.json_body` is when the `Content-Type` header is set to `application/json`. This means one is unable to retrieve the report payload when the request is a Content Security Policy violation report (as per https://www.w3.org/TR/CSP2/#violation-reports).
This limits using Chalice as an endpoint for `report-uri`.
Contributor guide
Research direction
Start by locating the implementation of Request.json_body and the request-parsing entry point. Verify how Content-Type is matched, then add support for application/csp-report so a CSP violation report payload can be retrieved through Chalice's report-uri endpoint. Done means the payload is available for that content type without breaking application/json handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100