From 1e02cb466a1644c81a61cc7b3717329df1bfaef7 Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Thu, 17 Jul 2025 20:51:23 -0700 Subject: [PATCH] fix: update MOTHERSHIP_URL formatting to include subdomain and trim path segments --- .changeset/happy-poets-wait.md | 5 +++++ packages/pockethost/src/constants.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/happy-poets-wait.md diff --git a/.changeset/happy-poets-wait.md b/.changeset/happy-poets-wait.md new file mode 100644 index 00000000..120216c0 --- /dev/null +++ b/.changeset/happy-poets-wait.md @@ -0,0 +1,5 @@ +--- +'pockethost': patch +--- + +update MOTHERSHIP_URL formatting to include subdomain and trim path segments diff --git a/packages/pockethost/src/constants.ts b/packages/pockethost/src/constants.ts index cd0e34a4..4c33f7c1 100644 --- a/packages/pockethost/src/constants.ts +++ b/packages/pockethost/src/constants.ts @@ -196,9 +196,9 @@ export const MOTHERSHIP_URL = (...path: string[]) => [ env .get('MOTHERSHIP_URL') - .default(`${HTTP_PROTOCOL()}://${MOTHERSHIP_NAME()}:${APEX_DOMAIN()}`) + .default(`${HTTP_PROTOCOL()}://${MOTHERSHIP_NAME()}.${APEX_DOMAIN()}`) .asString(), - path.join('/'), + ...path.map((p) => p.trim().replace(/^\/+|\/+$/g, '')), ] .filter(Boolean) .join('/')