Skip to content

Normalize configured API base URLs - #2919

Open
cupkk wants to merge 1 commit into
bghira:mainfrom
cupkk:fix-api-base-url-trailing-slashes
Open

Normalize configured API base URLs#2919
cupkk wants to merge 1 commit into
bghira:mainfrom
cupkk:fix-api-base-url-trailing-slashes

Conversation

@cupkk

@cupkk cupkk commented Jul 27, 2026

Copy link
Copy Markdown

Configured API and callback base URLs may include a trailing slash in split deployments. Since ApiClient also normalizes endpoint paths with a leading slash, direct concatenation produces URLs such as https://api.example.com//api/jobs.

Normalize trailing slashes in the two base URL getters so existing resolve, websocket, and fetch paths keep a single separator. The test covers both API and callback URLs, including multiple trailing slashes.

Tests:

  • npx jest --config tests/js/jest.config.js tests/js/api_client.test.js --runInBand
  • npm test -- --runInBand
  • node --check simpletuner/static/js/utils/api.js

Copilot AI review requested due to automatic review settings July 27, 2026 23:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

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