Skip to content

fix(frontend): use relative API base and remove duplicated /api/v1 en… - #18

Merged
Life-00 merged 1 commit into
mainfrom
deploy
Jan 19, 2026
Merged

fix(frontend): use relative API base and remove duplicated /api/v1 en…#18
Life-00 merged 1 commit into
mainfrom
deploy

Conversation

@Life-00

@Life-00 Life-00 commented Jan 19, 2026

Copy link
Copy Markdown
Owner

…dpoints

Copilot AI review requested due to automatic review settings January 19, 2026 18:05
@Life-00
Life-00 merged commit 032947f into main Jan 19, 2026
7 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the frontend API configuration to use relative paths instead of absolute URLs, enabling the application to work correctly when deployed behind an ingress controller that routes both frontend and backend on the same origin.

Changes:

  • Changed the default API base URL from http://127.0.0.1:8001 to an empty string (relative path)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// API Configuration
api: {
baseUrl: import.meta.env.VITE_API_BASE_URL || "http://127.0.0.1:8001",
baseUrl: import.meta.env.VITE_API_BASE_URL || "",

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

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

This change updates the default baseUrl from an absolute URL to a relative path (empty string), which is appropriate for production deployment where the frontend and backend are served from the same origin via ingress routing. However, this PR is titled "remove duplicated /api/v1 endpoints" but only changes the config file.

There are hardcoded "/api/v1/..." paths in reportAgentService.js (lines 89, 114, 138, 159) that will now result in duplicate path segments like "/api/v1/api/v1/agents/report/analyze" when combined with the apiUrl getter. These should use the already-defined config.api.endpoints.agents.report paths instead (analyze, history, delete, download).

If these reportAgentService.js changes are in a separate commit or file not shown here, please ensure they are included. Otherwise, this PR is incomplete and will break the report agent API calls.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants