Add isAdmin URL parameter to bypass VPN check
All checks were successful
ci/woodpecker/push/build Pipeline was successful
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:
@@ -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 }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user