Skip to content

extra validations when specifying custom endpoint#8

Closed
dselans wants to merge 1 commit intoPostHog:masterfrom
dselans:dselans/endpoint-verification
Closed

extra validations when specifying custom endpoint#8
dselans wants to merge 1 commit intoPostHog:masterfrom
dselans:dselans/endpoint-verification

Conversation

@dselans
Copy link
Contributor

@dselans dselans commented Aug 21, 2022

Had issues posting to a self-hosted instance of posthog. Realized that this was
because the library expects me to provide just the address (as in https://host.name.com)
whereas I was providing https://host.name.com/capture.

This PR adds some extra validations for the expected endpoint config.

Sidenote: for those who have kong in front of posthog, make sure to add routes
for both /capture and /batch - this library uses /batch :)

Had issues posting to a self-hosted instance of posthog. Realized that this was
because the library expects me to provide just the address (as in `https://host.name.com`)
whereas I was providing `https://host.name.com/capture`.

This PR adds some extra validations for the expected endpoint config.

Sidenote: for those who have kong in front of posthog, make sure to add routes
for both `/capture` and `/batch` - this library uses `/batch` :)
@orian
Copy link
Contributor

orian commented Jun 10, 2025

Thanks for this, we've added the endpoint validation in the v1.5.12 as an effect of a slightly bigger refactoring.

@orian orian closed this Jun 10, 2025
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.

2 participants