From 67e7d382e3dcb99cecfa97222dbb9b52b7738c23 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Fri, 4 Sep 2026 14:13:15 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F(frontend)=20add=20trailing?= =?UTF-8?q?=20slash=20on=20the=20/me=20endpoint=20call?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `/me` endpoint was called without a trailing slash, so every request was going through a 301 redirect before hitting the actual endpoint. This endpoint is called by every user at least once per session, so based on the logs, avoiding the redirect should cut the volume of requests hitting it by around 10%. --- CHANGELOG.md | 1 + src/frontend/src/features/auth/api/fetchUser.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 889a0613..ec4e3e32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to - 🐛(frontend) center Avatar initials with a font-aware cap-height ratio - 🐛(frontend) keep feedback buttons on one line for fr/es/en - ⚡️(frontend) increase lobby polling interval on both sides +- ⚡️(frontend) add trailing slash on the /me endpoint call ## [1.30.0] - 2026-09-01 diff --git a/src/frontend/src/features/auth/api/fetchUser.ts b/src/frontend/src/features/auth/api/fetchUser.ts index deed1760..103135a6 100644 --- a/src/frontend/src/features/auth/api/fetchUser.ts +++ b/src/frontend/src/features/auth/api/fetchUser.ts @@ -18,7 +18,7 @@ export const fetchUser = ( } ): Promise => { return new Promise((resolve, reject) => { - fetchApi('/users/me') + fetchApi('/users/me/') .then(resolve) .catch((error) => { // we assume that a 401 means the user is not logged in