diff --git a/.replit b/.replit index b28a4fdd..f953a379 100644 --- a/.replit +++ b/.replit @@ -52,6 +52,10 @@ externalPort = 80 localPort = 8044 externalPort = 3003 +[[ports]] +localPort = 33171 +externalPort = 3002 + [[ports]] localPort = 38557 externalPort = 3000 diff --git a/client/pages/SubdomainPassport.tsx b/client/pages/SubdomainPassport.tsx index 5ca1fd92..2c833932 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 "https://aethex.dev"; + } + return window.location.origin; +}; interface CreatorPassportResponse { type: "creator"; @@ -115,11 +121,11 @@ const SubdomainPassport = () => { let url = ""; if (subdomainInfo.isCreatorPassport) { - url = `${apiBase}/api/passport/subdomain-data/${encodeURIComponent( + url = `${apiBase}/api/passport/subdomain/${encodeURIComponent( subdomainInfo.subdomain, )}`; } else if (subdomainInfo.isProjectPassport) { - url = `${apiBase}/api/passport/project-data/${encodeURIComponent( + url = `${apiBase}/api/passport/project/${encodeURIComponent( subdomainInfo.subdomain, )}`; }