Skip to content

fix: remove chatwoot proxy to restore real-time websocket messages#96

Merged
kaladinlight merged 2 commits intodevelopfrom
fix-chatwoot
Feb 26, 2026
Merged

fix: remove chatwoot proxy to restore real-time websocket messages#96
kaladinlight merged 2 commits intodevelopfrom
fix-chatwoot

Conversation

@kaladinlight
Copy link
Contributor

@kaladinlight kaladinlight commented Feb 26, 2026

Summary by CodeRabbit

  • Infrastructure
    • Chatwoot messaging widget now connects directly to the official Chatwoot service, eliminating the internal proxy infrastructure.
    • Streamlined application by removing internal proxy routes, related HTTP headers, and middleware exclusion patterns.
    • Improved system efficiency and reduced complexity through direct service integration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between fc49679 and 5c81a22.

📒 Files selected for processing (4)
  • app/[lang]/_components/ChatwootWidget.tsx
  • app/api/chatwoot/[...path]/route.ts
  • middleware.ts
  • next.config.ts
💤 Files with no reviewable changes (2)
  • next.config.ts
  • app/api/chatwoot/[...path]/route.ts

📝 Walkthrough

Walkthrough

This pull request removes the backend proxy infrastructure for Chatwoot and reconfigures the frontend to communicate directly with the external Chatwoot service. The API key is now sourced from environment variables, proxy routes and headers are eliminated, and routing logic is updated accordingly.

Changes

Cohort / File(s) Summary
Chatwoot Widget Configuration
app/[lang]/_components/ChatwootWidget.tsx
Updated Chatwoot SDK configuration to source API key from NEXT_PUBLIC_CHATWOOT_API_KEY environment variable and changed base URL from internal proxy (/api/chatwoot) to external host (https://app.chatwoot.com).
Backend Proxy Infrastructure Removal
app/api/chatwoot/[...path]/route.ts
Entirely removed the Chatwoot proxy route handler containing GET and POST methods that forwarded requests, managed headers, and handled responses (135 lines deleted).
Routing Configuration Updates
middleware.ts, next.config.ts
Removed Chatwoot-specific exclusions from middleware matcher and deleted proxy header configuration block and URL rewrite rules that forwarded requests to the internal proxy endpoint.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • 0xApotheosis

Poem

🐰 A hop and a skip, the proxy's now gone,
Direct to Chatwoot, our chat carries on!
No middleware detours, just straight to the cloud,
The config's now cleaner, we're rather quite proud!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: removing the Chatwoot proxy infrastructure (route handlers, middleware matcher, and next.config rewrites) to restore real-time websocket functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-chatwoot

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel
Copy link

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website-frontend Ready Ready Preview, Comment Feb 26, 2026 8:43pm

Request Review

@kaladinlight kaladinlight merged commit 70d9180 into develop Feb 26, 2026
5 checks passed
@kaladinlight kaladinlight deleted the fix-chatwoot branch February 26, 2026 20:43
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.

1 participant