mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-29 00:01:06 +00:00
Move Codex client extensions and OpenAI-only endpoints into dedicated modules. Share HTTP transport rules and keep OpenAI identity filtering explicit. Remove redundant request metadata and test generation through actual routes. Co-authored-by: Codex <noreply@openai.com>
22 lines
609 B
Rust
22 lines
609 B
Rust
//! OpenAI 响应的私有身份与可公开诊断头分类
|
|
|
|
use gateway_protocol::openai::is_private_response_header;
|
|
|
|
#[test]
|
|
fn private_account_headers_should_be_case_insensitive_and_keep_public_diagnostics() {
|
|
for name in [
|
|
"chatgpt-account-id",
|
|
" X-OpenAI-Project ",
|
|
"x-codex-turn-metadata",
|
|
] {
|
|
assert!(is_private_response_header(name), "exposed {name}");
|
|
}
|
|
for name in [
|
|
"x-request-id",
|
|
"x-ratelimit-remaining-requests",
|
|
"x-provider-extension",
|
|
] {
|
|
assert!(!is_private_response_header(name), "hidden {name}");
|
|
}
|
|
}
|