Skip to content

Commit

Permalink
fix: Frontend error when creating SAML configuration if API URL is re…
Browse files Browse the repository at this point in the history
…lative (#4751)
  • Loading branch information
rolodato authored Oct 21, 2024
1 parent 6d2ab58 commit df1b84e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/web/components/modals/CreateSAML.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ const CreateSAML: FC<CreateSAML> = ({ 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')
Expand Down

0 comments on commit df1b84e

Please sign in to comment.