Skip to content

fix: Remove redundant trailing slash from API namespace configuration #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2025

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Jul 28, 2025

What?

Avoid redundant trailing slashes in API namespace configuration.

Why?

Fix CMM-623.

Trailing slashes are now expected to be providing in the configuration. This expectation was put in place to simplify configuration logic here and in host apps.

This change prevents double trailing slashes, which began occurring in WP-Android in the following. This resulted in failed API requests, like image uploads.

wordpress-mobile/WordPress-Android#22035

How?

Remove appended trailing slash.

Testing Instructions

  1. Open a new post.
  2. Insert an image block.
  3. Choose an image to upload.
  4. Verify the upload succeeds.

Accessibility Testing Instructions

N/A, navigation changes.

Screenshots or screencast

N/A, no visual changes.

Trailing slashes are now expected to be providing in the configuration.
This expectation was put in place to simplify configuration logic here
and in host apps.

This change prevents double trailing slashes, which began occurring in
WP-Android in the following. This resulted in failed API requests, like
image uploads.

wordpress-mobile/WordPress-Android#22035
Copy link
Contributor

@nbradbury nbradbury left a comment

Choose a reason for hiding this comment

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

Tested with the related Android PR and all is good :shipit:

@dcalhoun dcalhoun merged commit 09ab9ce into trunk Jul 28, 2025
11 checks passed
@dcalhoun dcalhoun deleted the fix/api-namespace-configuration branch July 28, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants