Skip to content

Let PostHog see that ingestion is proxied - #24

Merged
msmfa merged 1 commit into
masterfrom
analytics-proxy-signal
Sep 11, 2026
Merged

Let PostHog see that ingestion is proxied#24
msmfa merged 1 commit into
masterfrom
analytics-proxy-signal

Conversation

@msmfa

@msmfa msmfa commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Follow-up to #23. The proxy works, but PostHog could not tell.

When api_host is a custom origin, posthog-js tags every event with $lib_custom_api_host, and that property is how the installation health check recognises a reverse proxy. The sanitizer's allowlist dropped it, so the check would have stayed red forever even though /e30 was carrying all the traffic correctly.

Confirmed against production: searching a live $pageview for api_host in the event properties returned "No properties found".

The value is the site's own public origin, so there is nothing sensitive in letting it through.

When `api_host` is a custom origin, posthog-js tags every event with
`$lib_custom_api_host`, and that property is how the installation health
check recognises a reverse proxy. The sanitizer's allowlist dropped it, so
the check stayed red even though `/e30` was carrying all the traffic
correctly. The value is the site's own public origin, so there is nothing
sensitive in letting it through.
@msmfa
msmfa merged commit d9c84cf into master Sep 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant