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('/')