Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions frontend/src/app/services/token.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export class TokenInterceptor implements HttpInterceptor {
if (url.startsWith('http://')) {
return url;
}
if (url.startsWith('https://')) {
return url;
}
Comment on lines 34 to +39
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new https:// branch changes URL normalization behavior but the existing spec only checks interceptor creation. Please add unit tests that exercise normalizeURL() for http:// and https:// absolute URLs to ensure they are not prefixed with baseURL (and to guard against regressions).

Copilot uses AI. Check for mistakes.
Comment on lines 34 to +39
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The http:// and https:// checks are duplicated branches. Consider collapsing them into a single protocol check (e.g., https?://) to reduce the chance of future divergence and keep the normalization logic easier to maintain.

Suggested change
if (url.startsWith('http://')) {
return url;
}
if (url.startsWith('https://')) {
return url;
}
if (url.startsWith('http://') || url.startsWith('https://')) {
return url;
}

Copilot uses AI. Check for mistakes.
return `${baseURL}${url}`;
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/environments/environment.dev.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const environment = {
production: false,
saas: false,
apiRoot: 'https://rocketadmin-dev.tail9f8b2.ts.net/api',
saasURL: 'https://rocketadmin-dev.tail9f8b2.ts.net',
apiRoot: 'https://app.rocketadmin.com/api',
saasURL: 'https://app.rocketadmin.com',
Comment on lines +4 to +5
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

environment.dev.ts now points apiRoot/saasURL at the production host (app.rocketadmin.com). Since this file is used by the Angular build:development configuration (see frontend/angular.json), this will make “development” builds talk to production, which is risky and can also bypass the local /api proxy setup. If the goal is only to fix https URL handling, consider reverting these URLs back to the dev/staging host (or using relative /api + proxy) and introducing a separate environment file/config for production endpoints if needed.

Copilot uses AI. Check for mistakes.
saasHostnames: ['localhost', '127.0.0.1'],
stagingHost: '',
version: '0.0.0',
Expand Down
Loading