diff --git a/web/src/views/Jump/index.js b/web/src/views/Jump/index.js index c5f1baf5..c050f7c4 100644 --- a/web/src/views/Jump/index.js +++ b/web/src/views/Jump/index.js @@ -3,11 +3,11 @@ import { useLocation } from 'react-router-dom'; export default function Jump() { const location = useLocation(); - useEffect(() => { const params = new URLSearchParams(location.search); const jump = params.get('url'); - if (jump) { + const allowedUrls = ['opencat://', 'ama://']; + if (jump && allowedUrls.some((url) => jump.startsWith(url))) { window.location.href = jump; } }, [location]);