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 autoswapping projects via token #21214

Merged
merged 9 commits into from
Apr 8, 2024

Conversation

benjackwhite
Copy link
Contributor

@benjackwhite benjackwhite commented Mar 28, 2024

Problem

Fixes one issue from #21190 regarding urls not including the project

Server side part of PostHog/posthog-js#1098

Changes

  • Adds support for swapping to the project based on the api_token via a redirect
  • Will be paired with JS changes that includes the project api key in any posthog-js generated UI links.

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

How did you test this code?

Tests!

@benjackwhite benjackwhite marked this pull request as ready for review March 28, 2024 15:00
posthog/middleware.py Outdated Show resolved Hide resolved
Copy link
Member

@MarconLP MarconLP left a comment

Choose a reason for hiding this comment

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

smart idea

@posthog-bot
Copy link
Contributor

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.

@benjackwhite benjackwhite removed the stale label Apr 8, 2024
@benjackwhite benjackwhite merged commit dbf533c into master Apr 8, 2024
76 checks passed
@benjackwhite benjackwhite deleted the fix/project-token-middleware branch April 8, 2024 11:44
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.

4 participants