-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
26 lines (25 loc) · 862 Bytes
/
index.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
<?php
if (isset($_SERVER['HTTP_ORIGIN'])){
switch($_SERVER['HTTP_ORIGIN']){
case 'https://www.simpleip.de':
header('Access-Control-Allow-Origin: https://www.simpleip.de');
break;
case 'http://www.simpleip.de':
header('Access-Control-Allow-Origin: http://www.simpleip.de');
break;
case 'http://simpleip.de':
header('Access-Control-Allow-Origin: http://simpleip.de');
break;
default:
header('Access-Control-Allow-Origin: https://simpleip.de');
break;
}
} else {
header('Access-Control-Allow-Origin: https://simpleip.de');
}
header('Access-Control-Allow-Methods: GET');
header('Content-Type: text/plain; charset=utf-8');
header("Cache-Control: no-cache, no-store, must-revalidate");
// print ip address
print $_SERVER['REMOTE_ADDR'];
?>