diff --git a/frontend/web/components/modals/CreateSAML.tsx b/frontend/web/components/modals/CreateSAML.tsx index 1cec348fa40b..6ee7145d39d5 100644 --- a/frontend/web/components/modals/CreateSAML.tsx +++ b/frontend/web/components/modals/CreateSAML.tsx @@ -55,7 +55,10 @@ const CreateSAML: FC = ({ organisationId, samlName }) => { { skip: !samlName }, ) - const acsUrl = new URL(`/auth/saml/${name}/response/`, Project.api).href + const acsUrl = new URL( + `./auth/saml/${name}/response/`, + new Request(Project.api).url, // Project.api can be relative, e.g. /api/v1/ + ).href const copyAcsUrl = async () => { await navigator.clipboard.writeText(acsUrl) toast('Copied to clipboard')