forked from DSB/MySQLDumper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlogout.php
42 lines (31 loc) · 1.2 KB
/
logout.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* ---------------------------------------------------------------------
MyOOS [Dumper]
https://www.oos-shop.de/
Copyright (c) 2013 - 2024 by the MyOOS Development Team.
----------------------------------------------------------------------
Based on:
MySqlDumper
https://www.mysqldumper.de
Copyright (C)2004-2011 Daniel Schlichtholz ([email protected])
----------------------------------------------------------------------
Released under the GNU General Public License
----------------------------------------------------------------------
*/
if (isset($_SERVER['HTTPS']) && (strtolower((string) $_SERVER['HTTPS']) == 'on' || $_SERVER['HTTPS'] == 1)) {
$scheme = 'https';
} elseif (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) {
$scheme = 'https';
} else {
$scheme = 'http';
}
// Set the URL to redirect to
$logout_url = sprintf('%s://logout:logout@%s%s', $scheme, $_SERVER['HTTP_HOST'], dirname((string) $_SERVER['PHP_SELF']));
http_response_code(302);
header("Cache-Control: no-store");
header('Pragma: no-cache');
header_remove("WWW-Authenticate");
// Send the headers to redirect the user
header("Location: $logout_url");
exit;