S2OJ/web/app/controllers/logout.php
2022-09-18 12:58:35 +08:00

13 lines
187 B
PHP

<?php
crsf_defend();
Auth::logout();
?>
<script type="text/javascript">
var prevUrl = document.referrer;
if (!prevUrl) {
prevUrl = '/';
};
window.location.href = prevUrl;
</script>