fix(frontend): improve expected origin error message

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-10-23 22:52:02 +02:00 committed by Erik Michelson
parent d2a839b93b
commit e953a5115a

View file

@ -38,7 +38,9 @@ export const ExpectedOriginBoundary: React.FC<ExpectedOriginBoundaryProps> = ({
const currentOrigin = buildOriginFromHeaders() const currentOrigin = buildOriginFromHeaders()
if (new URL(expectedOrigin).origin !== currentOrigin) { if (new URL(expectedOrigin).origin !== currentOrigin) {
return <span>{`You can't open this page using this URL. For this endpoint "${expectedOrigin}" is expected.`}</span> return (
<span>{`You can't open this page using this URL. For this endpoint "${expectedOrigin}" is expected but got "${currentOrigin}".`}</span>
)
} }
return children return children
} }