Skip to content

fix: use /flags endpoint for nextjs rewrites#104

Merged
joshsny merged 2 commits intomainfrom
move-to-flags
Jul 23, 2025
Merged

fix: use /flags endpoint for nextjs rewrites#104
joshsny merged 2 commits intomainfrom
move-to-flags

Conversation

@joshsny
Copy link
Copy Markdown
Collaborator

@joshsny joshsny commented Jul 23, 2025

We want to use the new flags endpoint in rewrite configurations

Copilot AI review requested due to automatic review settings July 23, 2025 15:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates NextJS rewrite configurations to use the new /flags endpoint instead of the deprecated /decide endpoint. The change aligns the documentation and test configurations with the updated API endpoint.

  • Updates documentation examples to use /ingest/flags instead of /ingest/decide
  • Simplifies the test application configuration by removing PostHog-specific rewrites

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/nextjs/docs.ts Updates three NextJS configuration examples to use the new /flags endpoint in rewrite rules
e2e-tests/test-applications/nextjs-instrumentation-client-test-app/next.config.ts Simplifies configuration by removing PostHog rewrites and reverting to basic NextJS config
Comments suppressed due to low confidence (1)

e2e-tests/test-applications/nextjs-instrumentation-client-test-app/next.config.ts:2

  • The removal of PostHog rewrites from the test application configuration may break existing e2e tests that depend on the /ingest/flags endpoint being properly routed. Consider adding back the rewrite rules with the updated /flags endpoint to maintain test coverage.
const nextConfig = {};

@joshsny joshsny requested review from daniloc and jonathanlab July 23, 2025 15:58
Copy link
Copy Markdown
Collaborator

@daniloc daniloc left a comment

Choose a reason for hiding this comment

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

nice, makes sense to me!

@joshsny joshsny merged commit 8b5fe20 into main Jul 23, 2025
10 checks passed
daniloc pushed a commit that referenced this pull request Oct 27, 2025
* feat: use /flags endpoint

* remove packages from example
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.

3 participants