fix(auth): attach Bearer token to /api/bots requests
OfficialBotService posts to /api/bots/official/join-tournament, but the auth interceptor's protected-endpoint whitelist omitted /api/bots, so no Authorization header was sent and the request hit the official- bots service anonymously -> 401. Add /api/bots to the whitelist. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,8 @@ export const authInterceptor: HttpInterceptorFn = (req, next) => {
|
||||
req.url.includes('/api/account/official-bots') ||
|
||||
req.url.includes('/api/board/game') ||
|
||||
req.url.includes('/api/challenge') ||
|
||||
req.url.includes('/api/tournament');
|
||||
req.url.includes('/api/tournament') ||
|
||||
req.url.includes('/api/bots');
|
||||
|
||||
if (token && isProtectedEndpoint && !req.headers.has('Authorization')) {
|
||||
req = req.clone({
|
||||
|
||||
Reference in New Issue
Block a user