Skip to content

Conversation

@nd0ut
Copy link
Member

@nd0ut nd0ut commented Jan 14, 2026

Description

Checklist

Copilot AI review requested due to automatic review settings January 14, 2026 11:18
Copy link

Copilot AI left a comment

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 adds functionality to rewrite the CDN base domain for UploadcareGroup objects, allowing users to specify a custom CDN domain that replaces the default ucarecdn.com domain in group URLs.

Changes:

  • Introduces a new replaceUrlBase utility function to swap protocol, hostname, and port while preserving path, query, and hash components
  • Updates UploadcareGroup to use replaceUrlBase for rewriting the group's cdnUrl with the specified baseCDN
  • Adds comprehensive test coverage for both the new utility function and the updated UploadcareGroup behavior

Reviewed changes

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

Show a summary per file
File Description
packages/upload-client/src/tools/replaceUrlBase.ts New utility function that replaces the base URL (protocol, hostname, port) while preserving path and query parameters
packages/upload-client/src/tools/UploadcareGroup.ts Updated to use replaceUrlBase for rewriting the group's CDN URL with custom base domain
packages/upload-client/test/tools/replaceUrlBase.test.ts Test suite for the replaceUrlBase utility covering various URL transformation scenarios
packages/upload-client/test/tools/UploadcareGroup.test.ts Tests verifying that UploadcareGroup correctly applies custom CDN domains to group and file URLs
packages/upload-client/test/tools/UploadcareFile.test.ts Tests for UploadcareFile demonstrating CDN URL customization and file metadata handling

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

@nd0ut nd0ut requested a review from egordidenko January 14, 2026 11:19
@nd0ut nd0ut merged commit fdf1035 into master Jan 15, 2026
4 checks passed
@nd0ut nd0ut deleted the fix/group-cdn-url-prefixed branch January 15, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants