Skip to content

Add X-OCL-CLIENT header to all OCL clients #2429

@paynejd

Description

@paynejd

Summary

The OCL analytics system already supports client identification via the X-OCL-CLIENT request header (whitelisted in AnalyticsEventEmitter, extracted into request.client field). However, no OCL client currently sends it — all rely on imprecise fallback auto-detection from User-Agent/Origin headers.

Clients to update

Client Header value Status
ocl-cli ocl-cli/{version} ✅ Done
oclweb3 oclweb3/{version} Pending
oclweb2 oclweb2/{version} Pending
oclmap oclmap/{version} Pending
ocl-mcp ocl-mcp/{version} Pending
ocl-ai-assistant ocl-ai-assistant/{version} Pending
ocl-scispacy-loinc ocl-scispacy-loinc/{version} Pending

Each client adds X-OCL-CLIENT: {app-name}/{version} to all outgoing API requests. Python clients also add a descriptive User-Agent. No changes needed on the analytics or API server side.

Related

  • See also: follow-up ticket to inject version from build config in JS frontends (webpack DefinePlugin)

Metadata

Metadata

Labels

enhancementNew feature or requestreviewed/keepReviewed during backlog cleanup - confirmed to keep open

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions