From 174bffce15f7f33e27e6478a2f8900ba688c65b3 Mon Sep 17 00:00:00 2001 From: sirpiglr <49359077-sirpiglr@users.noreply.replit.com> Date: Wed, 3 Dec 2025 00:48:08 +0000 Subject: [PATCH] Update API calls to use the identity authority domain Modify the getApiBase function in SubdomainPassport.tsx to correctly determine the API endpoint based on the hostname, prioritizing VITE_FOUNDATION_URL for aethex.me and aethex.space subdomains. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: cb07c935-e82b-48e9-acb9-8ef33f94c84a Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/saoW2ee Replit-Helium-Checkpoint-Created: true --- client/pages/SubdomainPassport.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/pages/SubdomainPassport.tsx b/client/pages/SubdomainPassport.tsx index b7d4d495..58604c78 100644 --- a/client/pages/SubdomainPassport.tsx +++ b/client/pages/SubdomainPassport.tsx @@ -10,8 +10,14 @@ import FourOhFourPage from "@/pages/404"; import Index from "@/pages/Index"; import type { AethexUserProfile } from "@/lib/aethex-database-adapter"; -const getApiBase = () => - typeof window !== "undefined" ? window.location.origin : ""; +const getApiBase = () => { + if (typeof window === "undefined") return ""; + const hostname = window.location.hostname; + if (hostname.includes("aethex.me") || hostname.includes("aethex.space")) { + return import.meta.env.VITE_FOUNDATION_URL || "https://aethex.foundation"; + } + return window.location.origin; +}; interface CreatorPassportResponse { type: "creator";