fix(web): open legal documents on IM API host
This commit is contained in:
@@ -6,7 +6,7 @@ import { Icon } from '@/app/Icon';
|
||||
import { PasswordInput } from '@/features/auth/components/PasswordInput';
|
||||
import { VerificationCodeButton } from '@/features/auth/components/VerificationCodeButton';
|
||||
import { verifyRegistrationCode } from '@/lib/api/auth';
|
||||
import { apiBase, ImApiError } from '@/lib/api/client';
|
||||
import { fileBase, ImApiError } from '@/lib/api/client';
|
||||
import { getTinode, registerBasic } from '@/lib/tinode/connection';
|
||||
import { loginErrorMessage, validateCredentialsMessage } from '@/lib/tinode/errors';
|
||||
import { useSessionStore } from '@/stores/session';
|
||||
@@ -38,7 +38,9 @@ export function RegisterPage() {
|
||||
|
||||
if (!tenant) return <Navigate to="/tenant" replace />;
|
||||
const minPasswordLength = tenant.passwordPolicy?.minLength ?? 8;
|
||||
const legalOrigin = new URL(apiBase(), window.location.href).origin;
|
||||
// The deployed file endpoint is pinned to the IM API host; the web host serves
|
||||
// unknown /legal/* paths as the SPA index instead of the actual agreements.
|
||||
const legalOrigin = new URL(fileBase(), window.location.href).origin;
|
||||
|
||||
const submit = async (event: React.FormEvent) => {
|
||||
event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user