feat: 🎸 posthog (#1945)

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):
This commit is contained in:
Stan Girard 2024-01-02 10:03:49 +01:00 committed by GitHub
parent 234597a845
commit ea7ea600b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -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,
});

View File

@ -3,5 +3,11 @@
"deploymentEnabled": {
"main": false
}
}
},
"rewrites": [
{
"source": "/ingest/:path*",
"destination": "https://app.posthog.com/:path*"
}
]
}