Frontend apps like the notification bar or the feedback form cannot load in proxied NextJS.
I have a self hosted instance of PostHog and a NextJS app on two different domains. Event ingestion between the two works fine but frontend apps don't.
I use the following NextJS configuration as proxy from the web app domain to the posthog domain.
Next js rewrite proxy: This issue is related to using Next.js rewrites to proxy PostHog calls. The provided link discusses a similar issue and provides a code example and steps to reproduce the issue.
Access-Control-Allow-Origin missing on app.posthog.com: This issue is related to the "Access-Control-Allow-Origin" header missing on app.posthog.com. The provided link discusses a similar issue and provides additional co
ntext and potential solutions.
This message was generated by AI from www.triagetickets.com
Bug description
Frontend apps like the notification bar or the feedback form cannot load in proxied NextJS.
I have a self hosted instance of PostHog and a NextJS app on two different domains. Event ingestion between the two works fine but frontend apps don't.
I use the following NextJS configuration as proxy from the web app domain to the posthog domain.
I am using posthog-js for the web app like so
The login script loads fine
But it does not get executed because it is loaded as
text/html
Environment
PostHog Hobby self-hosted with
docker compose
, version/commit: 1.43.0Thank you for your bug report – we love squashing them!
Thanks for the awesome app you're building ❤️