feat(settings): add CorsSettings struct for CORS configuration
Implements CorsSettings struct with validation and deserialization support for configuring Cross-Origin Resource Sharing in the application settings. Ref: T010 (specs/001-modbus-relay-control)
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
- **Complexity**: Low | **Uncertainty**: Low
|
||||
- **Tests Written**: 5 tests (cors_settings_deserialize_from_yaml, cors_settings_default_has_empty_origins, cors_settings_with_wildcard_deserializes, settings_loads_cors_section_from_yaml, cors_settings_deserialize_with_defaults)
|
||||
|
||||
- [ ] **T010** [P] [Setup] [TDD] Add CorsSettings struct to settings.rs
|
||||
- [x] **T010** [P] [Setup] [TDD] Add CorsSettings struct to settings.rs
|
||||
- Struct fields: `allowed_origins: Vec<String>`, `allow_credentials: bool`, `max_age_secs: i32`
|
||||
- Implement Default with restrictive settings: `allowed_origins: vec![]`, `allow_credentials: false`, `max_age_secs: 3600`
|
||||
- Add `#[derive(Debug, serde::Deserialize, Clone)]` to struct
|
||||
|
||||
Reference in New Issue
Block a user