Skip to content

Update space id header key format#712

Merged
Ahoo-Wang merged 2 commits intomainfrom
update-space-id-header-key-format
Feb 4, 2026
Merged

Update space id header key format#712
Ahoo-Wang merged 2 commits intomainfrom
update-space-id-header-key-format

Conversation

@Ahoo-Wang
Copy link
Owner

No description provided.

- Changed header key from CoSec-Space-Id to X-Space-Id for standardization
- Maintained backward compatibility with existing space id capability interface
- Updated constant definition to follow conventional header naming practices

Signed-off-by: Ahoo Wang <ahoowang@qq.com>
…gacy support

- Replace CoSec- prefixed headers with X- prefixed standard format
- Add deprecated LEGACY constants for backward compatibility
- Implement getHeaderOrQuery helper methods for flexible key lookup
- Update AppIdCapable to use X-App-Id with CoSec-App-Id fallback
- Update DeviceIdCapable to use X-Device-Id with CoSec-Device-Id fallback
- Update RequestIdCapable to use X-Request-Id with CoSec-Request-Id fallback
- Maintain spaceId without legacy fallback as it was unchanged
- Add comprehensive test coverage for new key mappings

Signed-off-by: Ahoo Wang <ahoowang@qq.com>
@Ahoo-Wang Ahoo-Wang added the enhancement New feature or request label Feb 4, 2026
@Ahoo-Wang Ahoo-Wang merged commit 914d4c6 into main Feb 4, 2026
5 of 6 checks passed
@Ahoo-Wang Ahoo-Wang deleted the update-space-id-header-key-format branch February 4, 2026 07:03
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.15%. Comparing base (1ca6583) to head (163e281).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #712   +/-   ##
=========================================
  Coverage     92.15%   92.15%           
  Complexity      612      612           
=========================================
  Files           149      149           
  Lines          1823     1823           
  Branches        156      156           
=========================================
  Hits           1680     1680           
  Misses           74       74           
  Partials         69       69           
Flag Coverage Δ
unittests 92.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant