Skip to content

Admin Client creates malformed paths for requests #44269

@jonkoops

Description

@jonkoops

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

admin/client-js

Describe the bug

When the admin client is constructed with a URL that contains a trailing slash, paths are joined with multiple slashes, causing failures. This is compounded by recent changes that enforce URLs do not contain multiple slashes (see #43765)

Version

main

Regression

  • The issue is a regression

Expected behavior

The admin client does not add double slashes to base URLs that already end in a slash.

Actual behavior

The admin client adds double slashes to base URLs that already end in a slash.

How to Reproduce?

const adminClient = new KeycloakAdminClient({
  baseUrl: "http://localhost:8080/"
});

Anything else?

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions