<!DOCTYPE html>
<html lang="en">
<head>
<title>Security Check</title>
<meta charset=utf-8>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark" />
<style type="text/css">
<!--
@media (prefers-color-scheme: dark) {
  body {
    background-color: black;
    color: white;
  }
}
-->
</style>
<script type="text/javascript">
async function check_response() {
  const r = await fetch('/__verify', {
    body: '',
    method: 'POST',
  })
  const j = await r.json()
  if(j.status == 'ok') {
    let params = new URL(document.location).searchParams
    let url = params.get('url') || '/'
    if(url.indexOf('/') !== 0) {
      url = '/'
    }
    location.replace(url)
  } else {
    location.reload()
  }
}
setTimeout(check_response, 1000)
</script>
</head>
<body>
<h1>Security Check</h1>
<p>Please wait a few seconds...</p>
<p><small>You need to enable cookies to pass the verification.</small></p>
</body>
</html>
