diff --git a/frontend/constants.ts b/frontend/constants.ts index 20785f90db4f2..a50ba5e4a6da9 100644 --- a/frontend/constants.ts +++ b/frontend/constants.ts @@ -21,11 +21,11 @@ export function getBaseUrl(): string { https://img.shields.io/ */ try { - const { protocol, hostname } = window.location + const { protocol, hostname, port } = window.location if (['shields.io', 'www.shields.io'].includes(hostname)) { return 'https://img.shields.io' } - return `${protocol}//${hostname}` + return `${protocol}//${hostname}:${port}` } catch (e) { // server-side rendering return ''