Update uri.php

This commit is contained in:
Namhyeon Go 2021-10-27 16:11:21 +09:00 committed by GitHub
parent f2a4ec38f7
commit e3044d09b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -298,8 +298,26 @@ if(!is_fn("redirect_uri")) {
show_errors();
}
}
if(array_key_equals("method", $options, "html")) {
echo <<<EOF
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="1;url=$uri">
<title>Redirect</title>
</head>
<body>
<a id="goto" href="$uri">Go to the page</a>
<script>window.onload = function() { document.getElementById("goto").click(); };</script>
</body>
</html>
EOF;
} else {
header("Location: " . $uri, true, $permanent ? 301 : 302);
}
header("Location: " . $uri, true, $permanent ? 301 : 302);
exit();
}
}