Skip to content

Add PostHog Proxy#183

Merged
bryantgillespie merged 3 commits intomainfrom
connorwinston/mar-203
Mar 6, 2025
Merged

Add PostHog Proxy#183
bryantgillespie merged 3 commits intomainfrom
connorwinston/mar-203

Conversation

@connorwinston
Copy link
Member

This pull request adds rewrite proxy rules to Netlify deployments and configures the base API Host for PostHog depending on the deployment context. So the main prod deployment uses the main domain, other branches/pr's use their branch url, and all other cases use the base posthog url.

  • nuxt.config.ts: Added logic to set the host for Posthog based on the netlify deployment context.
  • public/_redirects: Added new redirect rules for /ingest/static/* and /ingest/* paths to point to Posthog's asset and API hosts, respectively.

@linear
Copy link

linear bot commented Mar 6, 2025

@netlify
Copy link

netlify bot commented Mar 6, 2025

Deploy Preview for directus-website ready!

Name Link
🔨 Latest commit 8a925bc
🔍 Latest deploy log https://app.netlify.com/sites/directus-website/deploys/67ca0e37f9698d0008b17f43
😎 Deploy Preview https://deploy-preview-183--directus-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@connorwinston connorwinston marked this pull request as ready for review March 6, 2025 20:03
@connorwinston connorwinston self-assigned this Mar 6, 2025
Copy link
Member

@bryantgillespie bryantgillespie left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀
Glad it was this easy to solve for.

@bryantgillespie bryantgillespie merged commit 2c80008 into main Mar 6, 2025
6 checks passed
@bryantgillespie bryantgillespie deleted the connorwinston/mar-203 branch March 6, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants