Add isAdmin URL parameter to bypass VPN check
All checks were successful
ci/woodpecker/push/build Pipeline was successful

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mikhail Kilin
2026-03-19 15:40:09 +03:00
parent 5cd6f5b96d
commit ea8463e8bc

View File

@@ -203,6 +203,11 @@ function App() {
const [vpnCheck, setVpnCheck] = useState<"loading" | "ok" | "vpn">("loading"); const [vpnCheck, setVpnCheck] = useState<"loading" | "ok" | "vpn">("loading");
useEffect(() => { useEffect(() => {
const params = new URLSearchParams(window.location.search);
if (params.get("isAdmin") === "true") {
setVpnCheck("ok");
return;
}
fetch("https://api.ipify.org?format=json") fetch("https://api.ipify.org?format=json")
.then((r) => r.json()) .then((r) => r.json())
.then((data: { ip: string }) => { .then((data: { ip: string }) => {