Skip to content

Commit

Permalink
remove pre-flight check
Browse files Browse the repository at this point in the history
  • Loading branch information
xvello committed Oct 17, 2023
1 parent e5ab7f9 commit 44b19f3
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/posthog-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -534,16 +534,8 @@ export class PostHog {
this.compression = compression
}

// Allow the backend to override the `/e/` endpoint, check that it's reachable before using
// We can only run the check if XHR is available.
if (response.analytics?.endpoint && USE_XHR) {
const endpoint = response.analytics?.endpoint
this._send_request(
this.config.api_host + endpoint,
{},
{ method: 'OPTIONS' },
() => (this.analyticsDefaultEndpoint = endpoint)
)
if (response.analytics?.endpoint) {
this.analyticsDefaultEndpoint = response.analytics.endpoint
}
}

Expand Down

0 comments on commit 44b19f3

Please sign in to comment.