Skip to content

Commit

Permalink
feat: 🎸 posthog (#1945)
Browse files Browse the repository at this point in the history
added reverse proxy

# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
  • Loading branch information
StanGirard authored Jan 2, 2024
1 parent 234597a commit ea7ea60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion frontend/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ if (
process.env.NEXT_PUBLIC_POSTHOG_HOST != null
) {
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY, {
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
ui_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
api_host: `${process.env.NEXT_PUBLIC_FRONTEND_URL}/ingest`,
opt_in_site_apps: true,
disable_session_recording: true,
});
Expand Down
8 changes: 7 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,11 @@
"deploymentEnabled": {
"main": false
}
}
},
"rewrites": [
{
"source": "/ingest/:path*",
"destination": "https://app.posthog.com/:path*"
}
]
}

0 comments on commit ea7ea60

Please sign in to comment.