forked from PeeHaa/OpCacheGUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.example.php
69 lines (63 loc) · 2.18 KB
/
init.example.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* Example file for settin up the environment specific configuration
*
* Note: you probably don't want to use the configuration in your project
* directly, but instead you want to:
* 1) copy this file
* 2) make the changes to the copy for your specific environment
* 3) load your specific configuration file in the init.deployment.php file
*
* PHP version 5.5
*
* @category OpCacheGUI
* @author Pieter Hordijk <[email protected]>
* @copyright Copyright (c) 2013 Pieter Hordijk <https://github.com/PeeHaa>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 1.0.0
*/
namespace OpCacheGUI;
use OpCacheGUI\I18n\FileTranslator;
use OpCacheGUI\Network\Router;
/**
* Setup error reporting
*/
error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('log_errors', 0);
/**
* Setup timezone
*/
ini_set('date.timezone', 'Europe/Amsterdam');
/**
* Setup the translator
*/
$translator = new FileTranslator(__DIR__ . '/texts', 'en');
/**
* Setup URI scheme (url rewrites [Router::URL_REWRITE] / query strings [Router::QUERY_STRING])
*/
$uriScheme = Router::URL_REWRITE;
/**
* Login credentials
*
* The password is a password compatible with PHP's password hashing functions (password_hash())
*
* Only addresses on the whitelist are allowed to log in
* The whitelist can contain a list of IP addresses or ranges in one of the following formats:
*
* * allows any IP address to log in (effectively disabling the whitelist and allowing access from any IP)
* localhost or 127.0.0.1 allows only log ins from the machine on which the application runs
* 10.0.0.5 allows a single address access
* 10.0.0.* allows any log in from the range starting from 10.0.0.0 to 10.0.0.255. All octets but the first can be a wildcard
* 10.0.0.1-10.0.0.24 defines a range of IP addresses which are allowed to log in (including the IP addresses defining the range)
* 10.0.0.10/24 defines a range of IP addresses in the CIDR format
*
* Multiple addresses or ranges can be defined
*/
$login = [
'username' => 'peehaa',
'password' => '$2y$14$kHoRlbxPF7Bf1903cDMTgeYBsFgF8aJA46LIH9Nsg4/ocDa9HTTbe',
'whitelist' => [
'localhost',
],
];