feat: add request validation and HEAD method support

- Validate Content-Type for API requests (application/json only)
- Add HEAD method handlers for all routes
- Add 1MB request body limit
- Improve method not allowed responses with Allow header
This commit is contained in:
2026-01-04 19:21:53 -06:00
parent 32f1f88a90
commit edf271bcc6
4 changed files with 81 additions and 18 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ time = { version = "0.3.44", features = ["formatting", "macros"] }
tokio = { version = "1.49.0", features = ["full"] }
tokio-util = { version = "0.7.18", features = ["io"] }
tower = "0.5"
tower-http = { version = "0.6.8", features = ["trace", "cors"] }
tower-http = { version = "0.6.8", features = ["trace", "cors", "limit"] }
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] }
ulid = { version = "1", features = ["serde"] }