+
Skip to content

Tags: etwodev/ramchi

Tags

v2.0.5

Toggle v2.0.5's commit message
fix: add missing routes for http spec

v2.0.4

Toggle v2.0.4's commit message
fix: prefer prefixed slashes for brevity

v2.0.3

Toggle v2.0.3's commit message
fix: ensure context-dependent middleware gets ran first

v2.0.2

Toggle v2.0.2's commit message
fix: update godoc and extend to include examples

v2.0.1

Toggle v2.0.1's commit message
fix: correct module path for Go v2 compatibility

v2.0.0

Toggle v2.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(server): extend middleware registration, config options, and tes…

…t coverage

- Middleware:
  • Add togglable middleware support at global, router, and route level
  • Register CORS and Logging middleware based on config flags
  • Inject structured logger into request context via LoggingMiddleware

- Configuration:
  • Expand `ramchi.config.json` with:
    ◦ enableCORS, allowedOrigins
    ◦ enableRequestLogging
    ◦ enableTLS, tlsCertFile, tlsKeyFile
    ◦ read/write/idle timeouts and maxHeaderBytes
  • Middleware toggling tied directly to these fields

- Tests:
  • Added validation for CORS headers
  • Added logger context assertion
  • Error routes now return JSON-formatted error messages
  • Assert proper registration paths and method handling

- Docs:
  • README now documents all configuration fields
  • Added togglable middleware section

BREAKING CHANGE:
- Middleware registration is now config-driven. Any middleware not explicitly enabled via config will not be applied.
- LoggingMiddleware depends on `enableRequestLogging` in config.
- CORSMiddleware requires both `enableCORS=true` and non-empty `allowedOrigins`.
- `ramchi/config.New()` must be called before any server instantiation.
- Routes and middleware marked as `Experimental=true` require `"experimental": true` in config.
- Errors are no longer returned using `Handle()` (removed); replace with explicit JSON writing (e.g., `json.NewEncoder(w).Encode(...)`).

v1.3.0

Toggle v1.3.0's commit message
feat: update to enable prefixing

v1.2.0

Toggle v1.2.0's commit message
feat: add helpers package

v1.1.0

Toggle v1.1.0's commit message
feat: introduce name field

v1.0.2

Toggle v1.0.2's commit message
fix: trigger-deployment

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载