forked from directus/v8-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_example.php
170 lines (149 loc) · 6.49 KB
/
_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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?php
// Directus Project Config Example
// Directus config files control everything that the API needs to know in order to run a project.
// This includes database credentials, where to save files, and what social providers to allow
return [
'database' => [
'type' => 'mysql', // Only mysql is supported
'host' => 'localhost',
'port' => 3306,
'name' => 'directus',
'username' => 'root',
'password' => 'root',
'engine' => 'InnoDB',
'charset' => 'utf8mb4',
// 'socket' => '', // Path to socket. Remove the `host` key above when using sockets
// 'driver_options' => [ // Other MYSQL_PDO options. Can be used to connect to the database
// // over an encrypted connection. For more information, see
// // https://www.php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.constants
// PDO::MYSQL_ATTR_SSL_CAPATH => '/etc/ssl/certs',
// ]
],
'cors' => [
'enabled' => true, // Enable or disable all CORS headers
'origin' => ['*'], // Access-Control-Allow-Origin
'methods' => [ // Access-Control-Allow-Methods
'GET',
'POST',
'PUT',
'PATCH',
'DELETE',
'HEAD',
],
'headers' => [], // Access-Control-Allow-Headers
'exposed_headers' => [], // Access-Control-Expose-Headers
'max_age' => null, // Access-Control-Allow-Max-Age
'credentials' => false, // Access-Control-Allow-Credentials
],
'rate_limit' => [
'enabled' => false, // Enable or disable all rate limiting
'limit' => 100, // Number of requests allowed...
'interval' => 60, // ...during this interval (in seconds)
'adapter' => 'redis', // Where to save the rate limit tmp data
'host' => '127.0.0.1',
'port' => 6379,
'timeout' => 10 // Timeout from API to rate limit storage adapter
],
'storage' => [
'adapter' => 'local', // What storage adapter to use for files
// Defaults to the local filesystem. Other natively supported
// options include: Amazon S3, Aliyun OSS
// You'll need to require the correct flysystem adapters through Composer
// See https://docs.directus.io/extensions/storage-adapters.html#using-aws-s3
'root' => 'public/uploads/project-name/originals', // Where files are stored on disk
'thumb_root' => 'public/uploads/project-name/generated', // Where thumbnails are stored on disk
'root_url' => '/uploads/project-name/originals', // Where files are accessed over the web
'proxy_downloads' => false, // Use an internal proxy for downloading all files
// S3
////////////////////////////////////////
// 'key' => 's3-key',
// 'secret' => 's3-secret',
// 'region' => 's3-region',
// 'version' => 's3-version',
// 'bucket' => 's3-bucket',
// 'options' => [
// 'ACL' => 'public-read',
// 'Cache-Control' => 'max-age=604800'
// ],
// 'endpoint' => 's3-endpoint',
// Aliyun OSS
////////////////////////////////////////
// 'OSS_ACCESS_ID' => 'aliyun-oss-id',
// 'OSS_ACCESS_KEY' => 'aliyun-oss-key',
// 'OSS_ENDPOINT' => 'aliyun-oss-endpoint',
// 'OSS_BUCKET' => 'aliyun-oss-bucket',
],
'mail' => [
'default' => [
'transport' => 'smtp', // How to send emails. Supports `smtp` and `sendmail`
'from' => '[email protected]', // The sender of the email
// SMTP
////////////////////////////////////////
'host' => 'smtp.example.com',
'port' => 25,
'username' => 'smtp-user',
'password' => 'd1r3ctu5',
'encryption' => 'tls'
],
],
'cache' => [
'enabled' => false, // Cache all API responses
'response_ttl' => 3600, // Keep the cache for n seconds
'pool' => [
'adapter' => 'apc', // What adapter to use to store the cache in
// Supports: apc, apcu, filesystem, memcached,
// memcache, redis
// Filesystem
////////////////////////////////////////
// 'path' => '../cache/',
// memcached, memcache, redis
////////////////////////////////////////
// 'host' => 'localhost',
// 'port' => 11211,
],
],
'auth' => [
'secret_key' => '1234', // Used in the oAuth flow
'public_key' => '9876',
'social_providers' => [
// 'okta' => [
// 'client_id' => '',
// 'client_secret' => '',
// 'base_url' => 'https://dev-000000.oktapreview.com/oauth2/default'
// ],
// 'github' => [
// 'client_id' => '',
// 'client_secret' => ''
// ],
// 'facebook' => [
// 'client_id' => '',
// 'client_secret' => '',
// 'graph_api_version' => 'v2.8',
// ],
// 'google' => [
// 'client_id' => '',
// 'client_secret' => '',
// 'hosted_domain' => '*',
// 'use_oidc_mode' => true,
// ],
// 'twitter' => [
// 'identifier' => '',
// 'secret' => ''
// ]
]
],
'hooks' => [ // https://docs.directus.io/extensions/hooks.html#creating-hooks
'actions' => [],
'filters' => [],
],
'tableBlacklist' => [], // What tables to globally ignore within Directus
'env' => 'production', // production, development, or staging
// Production silences stack traces and error details in API output
'logger' => [
'path' => '../logs', // Where to save warning and error logs for the API
],
'feedback' => [
'token' => '123', // Not currently used
'login' => true // Not currently used
],
];