Skip to content

Commit 55ab04c

Browse files
authored
Release/v25.12.4 (#2507)
* chore: update .gitignore to allow build artifacts and update build artifacts - Allow JS, CSS, font files, and assets directory in api/ui/build - Update index.html with latest build artifacts * fix: mount API routes at both root path and root level when RootPath is configured - Fixes login API returning HTML instead of JSON when RootPath is set - API routes now work with both /ui/auth/login and /convoylocal/ui/auth/login - Added response validation in login component - Removed debug logging
1 parent e6885b0 commit 55ab04c

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

api/api.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ func (a *ApplicationHandler) BuildControlPlaneRoutes() *chi.Mux {
248248
a.mountControlPlaneRoutes(subRouter, handler)
249249
subRouter.HandleFunc("/*", a.reactRootHandler)
250250
router.Mount(a.cfg.RootPath, subRouter)
251+
252+
// Also mount API routes at root level so they work with or without root path prefix
253+
// This allows the frontend to work regardless of how URLs are constructed
254+
a.mountControlPlaneRoutes(router, handler)
251255
} else {
252256
a.mountControlPlaneRoutes(router, handler)
253257
}

web/ui/dashboard/src/app/public/login/login.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ export class LoginComponent implements OnInit, AfterViewInit {
122122
try {
123123
const response: any = await this.loginService.login(this.loginForm.value);
124124

125+
// Check if response has the expected structure
126+
if (!response || !response.data) {
127+
throw new Error('Invalid response structure from login API - response or response.data is missing');
128+
}
129+
125130
const lastUserId = localStorage.getItem('CONVOY_LAST_USER_ID');
126131

127132
let refresh = true;

web/ui/dashboard/src/app/services/http/http.service.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,6 @@ export class HttpService {
194194
const url = this.buildURL(requestDetails);
195195
if (url === 'error') return;
196196

197-
// console.log("request url: ", url)
198-
// console.log("headers:", requestHeader)
199-
// console.log("request deet", requestDetails)
200-
201197
// make request
202198
const { data } = await http.request({
203199
method: requestDetails.method,

0 commit comments

Comments
 (0)