Commit Graph
17 Commits
Author SHA1 Message Date
meiseayoung 4e2c6a90c3 feat: add 7 built-in middleware components inspired by Hono.js
New Middleware:
- CORS: Cross-Origin Resource Sharing with full configuration support
- Cookie Helper: Cookie management with signed cookie support (HMAC-SHA256)
- JWT: JSON Web Token authentication (HS256/384/512)
- Bearer Auth: Simple Bearer token authentication
- Compression: Gzip and deflate response compression
- Rate Limiting: Request rate limiting with customizable stores
- Validator: Schema-based request validation

Features:
- Context store for middleware data sharing (get/set/get_client_ip)
- Middleware export module with utility functions
- Comprehensive property-based tests for all middleware
- Example file demonstrating all middleware usage

Files Added:
- cors.v, cookie.v, jwt.v, bearer_auth.v, compress.v, rate_limit.v, validator.v
- middleware.v (unified exports)
- examples/middleware_demo.v
- tests/test_*.v (9 new test files)

Documentation:
- Updated README.md with detailed middleware usage guide
- Added Schema Builder API documentation
2026-01-04 11:11:15 +08:00
meiseayoung 44ba82c194 chore: update v.mod version 2026-01-03 20:50:24 +08:00
meiseayoung 43aae4f10d chore: update v.mod version 2026-01-02 21:51:01 +08:00
meiseayoung 9aefe5714d chore: update v.mod version 2025-12-31 18:35:29 +08:00
meiseayoung b478269d8e chore: update v.mod version 2025-12-31 17:38:29 +08:00
meiseayoung 0937dd268c chore: update v.mod version 2025-12-31 15:46:10 +08:00
meiseayoung 5375b7394f chore: update v.mod version 2025-12-30 21:40:39 +08:00
meiseayoung 8e1007a1b4 chore: update v.mod version 2025-12-30 18:42:02 +08:00
meiseayoung 418ead392b chore: update v.mod version 2025-12-30 18:29:52 +08:00
meiseayoung e22f612f24 chore: update v.mod version 2025-12-30 17:32:05 +08:00
meiseayoung ee2818782b chore: update v.mod version 2025-12-30 14:27:57 +08:00
meiseayoung 782a4e7795 refc: Refactor project structure 2025-12-30 11:00:46 +08:00
meiseayoung 1f8e9ac11e Update v.mod 2025-07-11 11:24:14 +08:00
yangshangbo 2e859cbe99 fix: remove outer .v module 2025-07-11 10:08:09 +08:00
yangshangbo d59c268492 feat: add chunk file upload 2025-07-10 10:03:57 +08:00
yangshangbo 763b2e62b5 feat: add HybridRouter add LRUCache 2025-07-04 14:49:00 +08:00
yangshangbo 8b18de9693 first commit 2025-04-10 18:14:01 +08:00