Skip to content

Commit

Permalink
Using NEXT_PUBLIC_VERCEL_ENV to determine whether to reroute chat/sug…
Browse files Browse the repository at this point in the history
…gest endpoints (#1986)
  • Loading branch information
dubwub authored Jan 13, 2025
1 parent 7882bd7 commit 54d214c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fern-docs/ui/src/search/SearchV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function SearchV2(): ReactElement | false {

// Rerouting to ferndocs.com for production environments to ensure streaming works
// Also see: next.config.mjs, where we set CORS headers
if (process.env.NODE_ENV === "production") {
if (process.env.NEXT_PUBLIC_VERCEL_ENV === "production") {
chatEndpoint = `https://app.ferndocs.com/api/fern-docs/search/v2/chat`;
suggestEndpoint = `https://app.ferndocs.com/api/fern-docs/search/v2/suggest`;
}
Expand Down

0 comments on commit 54d214c

Please sign in to comment.