-
Notifications
You must be signed in to change notification settings - Fork 9
/
configuration.php
126 lines (122 loc) · 5.22 KB
/
configuration.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
return [
'public_path' => APP_PUBLIC_PATH,
'public_dir' => APP_PUBLIC_DIR,
'frontend_config' => [
'app_name' => 'FileGator - Read-only demo',
'app_version' => APP_VERSION,
'language' => 'english',
'logo' => 'https://filegator.io/filegator_logo.svg',
'upload_max_size' => 100 * 1024 * 1024, // 100MB
'upload_chunk_size' => 1 * 1024 * 1024, // 1MB
'upload_simultaneous' => 3,
'default_archive_name' => 'archive.zip',
'editable' => ['.txt', '.css', '.js', '.ts', '.html', '.php'],
'date_format' => 'YY/MM/DD hh:mm:ss',
],
'services' => [
'Filegator\Services\Logger\LoggerInterface' => [
'handler' => '\Filegator\Services\Logger\Adapters\MonoLogger',
'config' => [
'monolog_handlers' => [
function () {
return new \Monolog\Handler\StreamHandler(
__DIR__.'/private/logs/app.log',
\Monolog\Logger::DEBUG
);
},
],
],
],
'Filegator\Services\Session\SessionStorageInterface' => [
'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',
'config' => [
'handler' => function () {
$save_path = null; // use default system path
//$save_path = __DIR__.'/private/sessions';
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler($save_path);
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([
"cookie_samesite" => "Lax",
"cookie_secure" => true,
"cookie_httponly" => true,
], $handler);
},
],
],
'Filegator\Services\Cors\Cors' => [
'handler' => '\Filegator\Services\Cors\Cors',
'config' => [
'enabled' => APP_ENV == 'production' ? false : true,
],
],
'Filegator\Services\Tmpfs\TmpfsInterface' => [
'handler' => '\Filegator\Services\Tmpfs\Adapters\Tmpfs',
'config' => [
'path' => __DIR__.'/private/tmp/',
'gc_probability_perc' => 10,
'gc_older_than' => 60 * 60 * 24 * 2, // 2 days
],
],
'Filegator\Services\Security\Security' => [
'handler' => '\Filegator\Services\Security\Security',
'config' => [
'csrf_protection' => true,
'ip_whitelist' => [],
'ip_blacklist' => [],
],
],
'Filegator\Services\View\ViewInterface' => [
'handler' => '\Filegator\Services\View\Adapters\Vuejs',
'config' => [
'add_to_head' => '',
'add_to_body' => '
<style>@media screen and (max-width:1240px){#forkme{display:none}}}</style>
<a id="forkme" href="https://github.com/filegator/filegator">
<img style="position: absolute; top: 0; left: 0; border: 0;" src="https://github.blog/wp-content/uploads/2008/12/forkme_left_darkblue_121621.png?resize=149%2C149" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png"></a>
<!-- Ticksel analytics v1.0 -->
<script type="text/javascript">
var _tcfg = _tcfg || [];
(function() {
_tcfg.push(["tags", "filegator-io,filegator-io-demo"]);
var u="https://a.interactive32.com/js/safetick.js"; _tcfg.push(["account_id", 8348834]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0];
g.type="text/javascript"; g.async=true; g.src=u; g.setAttribute("crossorigin", "anonymous");
s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><img src="https://a.interactive32.com/beam?account_id=8348834&referrer=&tags=filegator-io,filegator-io-demo" style="border:0;" width="0" height="0" alt="" /></noscript>
<!-- End Ticksel Code -->
',
],
],
'Filegator\Services\Storage\Filesystem' => [
'handler' => '\Filegator\Services\Storage\Filesystem',
'config' => [
'separator' => '/',
'config' => [],
'adapter' => function () {
return new \League\Flysystem\Adapter\Local(
'/var/www/demorepo'
);
},
],
],
'Filegator\Services\Archiver\ArchiverInterface' => [
'handler' => '\Filegator\Services\Archiver\Adapters\ZipArchiver',
'config' => [],
],
'Filegator\Services\Auth\AuthInterface' => [
'handler' => '\Filegator\Services\Auth\Adapters\JsonFile',
'config' => [
'file' => __DIR__.'/private/users.json',
],
],
'Filegator\Services\Router\Router' => [
'handler' => '\Filegator\Services\Router\Router',
'config' => [
'query_param' => 'r',
'routes_file' => __DIR__.'/backend/Controllers/routes.php',
],
],
],
];