Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow overriding api_host for analytics/session recording #943

Closed
wants to merge 1 commit into from

Conversation

frankh
Copy link
Contributor

@frankh frankh commented Dec 20, 2023

Changes

Currently we can override the endpoint path but not the hostname

Checklist

@frankh frankh force-pushed the frank/allow-api-host-override branch from fb27b65 to 106ab3c Compare December 20, 2023 10:04
Copy link

github-actions bot commented Dec 20, 2023

Size Change: +1.46 kB (0%)

Total Size: 754 kB

Filename Size Change
dist/array.full.js 177 kB +364 B (0%)
dist/array.js 118 kB +364 B (0%)
dist/es.js 118 kB +364 B (0%)
dist/module.js 119 kB +364 B (0%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 12 kB
dist/recorder-v2.js 104 kB
dist/recorder.js 58.4 kB
dist/surveys.js 46.8 kB

compressed-size-action

@frankh frankh requested a review from xvello December 20, 2023 10:12
@frankh frankh force-pushed the frank/allow-api-host-override branch from 106ab3c to 767373a Compare December 20, 2023 10:40
Currently we can override the endpoint path but not the hostname
@frankh frankh force-pushed the frank/allow-api-host-override branch from 767373a to ef3ff32 Compare December 20, 2023 11:17
Copy link
Contributor

@xvello xvello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably too spicy in my opinion. Deployed as it is, we would bypass custom reverse proxies, which would not be acceptable.

Because reverse proxies now rewrite the host header (a change we asked for), we won't be able to detect that in django and must handle it client side. You could overwrite this.config.api_host if the configured value end with .posthog.com, but not respecting a user-given config still makes me nervous.

@posthog-bot
Copy link
Collaborator

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@posthog-bot
Copy link
Collaborator

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

@posthog-bot posthog-bot closed this Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants