Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(dashboard): keep /api-keys out of the dev server proxy

Yudhi Armyndharis704522c16501
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1c72d4c1a..5688d807c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- The dashboard dev server proxies only `/api/` paths, so a full reload of the API Keys page (`/api-keys`) loads the dashboard instead of being forwarded to the backend.
- The dashboard Chats thread renders an `@<digits>` mention as `@FirstName` when that participant has posted in the loaded thread and their id matches the digits in the body. This covers whatsapp-web.js, where the author id and the mention carry the same digits. On Baileys the author is normalized to the phone number when the lid mapping is known while the body keeps the lid digits, so those mentions stay as WhatsApp sent them, as does any mention of someone who has not posted. The resolved name renders inside its own `<bdi>` element, outside Linkify's `ignoreTags`-respected walk, so a push name can never become a clickable link, however it's spelled. Thanks @TanmayChachra.
### Documentation
diff --git a/dashboard/vite.config.ts b/dashboard/vite.config.ts
index 07ea89db3..2fe11ca6b 100644
--- a/dashboard/vite.config.ts
+++ b/dashboard/vite.config.ts
@@ -27,7 +27,9 @@ export default defineConfig({
server: {
port: 2886,
proxy: {
- '/api': {
+ // With the trailing slash: Vite matches a plain key as a string prefix, so '/api' also
+ // captured the SPA route /api-keys and a reload of that page went to the backend.
+ '/api/': {
target: 'http://localhost:2785',
changeOrigin: true,
secure: false,