-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathservers-sf.php
More file actions
31 lines (26 loc) · 830 Bytes
/
servers-sf.php
File metadata and controls
31 lines (26 loc) · 830 Bytes
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
<?php
//
// This is a shim to provide a local https interface to a remote backend that doesn't provide https.
//
$origins = array(
'http://jamulus.softins.co.uk' => 1,
'https://jamulus.softins.co.uk' => 1,
'http://jamulus.softins.co.uk:8080' => 1,
'http://explorer.jamulus.io' => 1,
'https://explorer.jamulus.io' => 1,
'http://explorer.jamulus.io:8080' => 1,
'http://explorer.softins.co.uk' => 1,
'https://explorer.softins.co.uk' => 1,
'http://explorer.softins.co.uk:8080' => 1
);
if (isset($_SERVER['HTTP_ORIGIN'])) {
$http_origin = $_SERVER['HTTP_ORIGIN'];
if (array_key_exists($http_origin, $origins))
{
header("Access-Control-Allow-Origin: $http_origin");
header("Vary: Origin");
}
}
header('Content-Type: application/json');
readfile("http://137.184.177.58/servers.php?" . $_SERVER['QUERY_STRING']);
?>