Skip to content

Commit e154281

Browse files
fix: The proxy URL is being altered in version 2.20.4, resulting in an invalid URL
1 parent a13fc91 commit e154281

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

packages/core/src/__tests__/util.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ describe('getURL function', () => {
172172
});
173173

174174
it('should return the root URL when the path is empty', () => {
175-
expect(getURL('www.example.com', '')).toBe('https://www.example.com/');
175+
expect(getURL('www.example.com', '')).toBe('https://www.example.com');
176176
});
177177

178178
it('should handle query parameters correctly in the URL path', () => {

packages/core/src/util.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,6 @@ export const createPromise = <T>(
259259
};
260260

261261
export function getURL(host: string, path: string) {
262-
if (path === '') {
263-
path = '/'; // Ensure a trailing slash if path is empty
264-
}
265262
if (!host.startsWith('https://') && !host.startsWith('http://')) {
266263
host = 'https://' + host;
267264
}

0 commit comments

Comments
 (0)