Skip to content

Commit eb84be4

Browse files
committed
Fixing adminer.
1 parent fbefe9f commit eb84be4

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

www/adminer/index.php

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
<?php
22

3-
/*if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) || !isset($_SERVER['REMOTE_ADDR']) ||
4-
!in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1']))
5-
{
6-
header('HTTP/1.1 403 Forbidden');
7-
echo 'Adminer is available only from localhost';
8-
for ($i = 2e3; $i; $i--) echo substr(" \t\r\n", rand(0, 3), 1);
9-
exit;
10-
}*/
3+
$index = __DIR__ . '/../../vendor/dg/adminer-custom/index.php';
114

12-
13-
$root = __DIR__ . '/../../vendor/dg/adminer-custom';
14-
15-
if (!is_file($root . '/index.php')) {
5+
if (!is_file($index)) {
166
echo "Install Adminer using `composer install`\n";
177
exit(1);
188
}
199

20-
21-
require $root . '/index.php';
10+
touch(__DIR__ . '/adminer.css');
11+
require $index;

0 commit comments

Comments
 (0)