Skip to content

Extending middleware registration, config options, and test coverage#2

Merged
etwodev merged 10 commits intomainfrom
etwodev/refactoring-functionality
Jul 10, 2025
Merged

Extending middleware registration, config options, and test coverage#2
etwodev merged 10 commits intomainfrom
etwodev/refactoring-functionality

Conversation

@etwodev
Copy link
Owner

@etwodev etwodev commented Jul 10, 2025

📄 Scope

This merge request introduces extensive improvements to the ramchi library:

🚀 Features

  • Middleware can now be toggled per global, router, and route level based on config values.
  • Logger is injected via middleware and extracted from context.Context.
  • CORS is fully configurable via allowedOrigins in ramchi.config.json.

🧪 Testing Improvements

  • Routes and middleware are tested for status codes, response bodies, CORS headers, and logger context injection.
  • Failsafe checks for experimental and status toggling in both routers and middleware are in place.

📚 Documentation

  • README expanded with accurate config reference and usage.
  • Added a section explicitly explaining how togglable middleware is handled.

@etwodev etwodev force-pushed the etwodev/refactoring-functionality branch from 4075519 to 3f5a946 Compare July 10, 2025 20:25
@etwodev etwodev merged commit 868f50e into main Jul 10, 2025
6 checks passed
@etwodev etwodev deleted the etwodev/refactoring-functionality branch July 10, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant