Skip to content
This repository was archived by the owner on Aug 7, 2026. It is now read-only.

Commit 5629fa5

Browse files
authored
feat(metrics): tag cryptify uploads with X-Cryptify-Source: outlook (#96)
Adds the X-Cryptify-Source: outlook header to clientHeaders() so cryptify's per-channel upload metrics (encryption4all/cryptify#102) classify this add-in deterministically. cryptify's detect_channel checks the Origin header before falling back to User-Agent substring matching. The add-in is served from addin.*.postguard.eu, which matches cryptify's `contains("postguard.")` rule and would otherwise shadow the User-Agent "outlook" check — labeling Outlook uploads as `website` / `staging-website` instead of `outlook`. Setting the explicit header here removes the ambiguity.
1 parent c4ca35c commit 5629fa5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/lib/pkg-client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@ export const CLIENT_ID = "pg4ol";
1515
export function clientHeaders(addinVersion: string): Record<string, string> {
1616
return {
1717
"X-PostGuard-Client-Version": `${CLIENT_NAME},1.0,${CLIENT_ID},${addinVersion}`,
18+
// Identifies this add-in in cryptify's per-channel upload metrics.
19+
// Required because cryptify's detect_channel checks the Origin
20+
// header before User-Agent, and the add-in is served from
21+
// addin.*.postguard.eu — without this header it would be
22+
// misclassified as `website` / `staging-website`.
23+
"X-Cryptify-Source": "outlook",
1824
};
1925
}

0 commit comments

Comments
 (0)