[apps] Update apps allowlist. (#12211)

- [x] Update apps allowlist.
This commit is contained in:
Matthew Zeng
2026-02-18 23:21:32 -08:00
committed by GitHub
parent 16c3c47535
commit 18eb640a47
2 changed files with 53 additions and 9 deletions
+15
View File
@@ -114,6 +114,10 @@ pub fn is_first_party_originator(originator_value: &str) -> bool {
|| originator_value.starts_with("Codex ")
}
pub fn is_first_party_chat_originator(originator_value: &str) -> bool {
originator_value == "codex_atlas" || originator_value == "codex_chatgpt_desktop"
}
pub fn get_codex_user_agent() -> String {
let build_version = env!("CARGO_PKG_VERSION");
let os_info = os_info::get();
@@ -234,6 +238,17 @@ mod tests {
assert_eq!(is_first_party_originator("Other"), false);
}
#[test]
fn is_first_party_chat_originator_matches_known_values() {
assert_eq!(is_first_party_chat_originator("codex_atlas"), true);
assert_eq!(
is_first_party_chat_originator("codex_chatgpt_desktop"),
true
);
assert_eq!(is_first_party_chat_originator(DEFAULT_ORIGINATOR), false);
assert_eq!(is_first_party_chat_originator("codex_vscode"), false);
}
#[tokio::test]
async fn test_create_client_sets_default_headers() {
skip_if_no_network!();