mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
fix(frontend): improve expected origin error message
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
d2a839b93b
commit
e953a5115a
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue