directus 9.10.0 → 9.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +8 -1
- package/dist/auth/drivers/oauth2.d.ts +1 -1
- package/dist/auth/drivers/oauth2.js +14 -11
- package/dist/auth/drivers/openid.d.ts +1 -1
- package/dist/auth/drivers/openid.js +14 -11
- package/dist/cli/commands/schema/apply.js +4 -3
- package/dist/cli/utils/create-env/env-stub.liquid +266 -9
- package/dist/controllers/activity.js +1 -1
- package/dist/controllers/assets.js +8 -9
- package/dist/controllers/flows.d.ts +2 -0
- package/dist/controllers/flows.js +157 -0
- package/dist/controllers/folders.js +1 -1
- package/dist/controllers/notifications.js +1 -1
- package/dist/controllers/operations.d.ts +2 -0
- package/dist/controllers/operations.js +138 -0
- package/dist/database/helpers/date/dialects/sqlite.js +6 -2
- package/dist/database/index.js +15 -19
- package/dist/database/migrations/20210225A-add-relations-sort-field.js +2 -1
- package/dist/database/migrations/20210506A-rename-interfaces.js +2 -1
- package/dist/database/migrations/20210802A-replace-groups.js +2 -1
- package/dist/database/migrations/20210805A-update-groups.js +2 -1
- package/dist/database/migrations/20210805B-change-image-metadata-structure.js +3 -2
- package/dist/database/migrations/20211007A-update-presets.js +5 -4
- package/dist/database/migrations/20220429A-add-flows.d.ts +3 -0
- package/dist/database/migrations/20220429A-add-flows.js +83 -0
- package/dist/database/migrations/20220429B-add-color-to-insights-icon.d.ts +3 -0
- package/dist/database/migrations/20220429B-add-color-to-insights-icon.js +15 -0
- package/dist/database/migrations/20220429C-drop-non-null-from-ip-of-activity.d.ts +3 -0
- package/dist/database/migrations/20220429C-drop-non-null-from-ip-of-activity.js +15 -0
- package/dist/database/migrations/20220429D-drop-non-null-from-sender-of-notifications.d.ts +3 -0
- package/dist/database/migrations/20220429D-drop-non-null-from-sender-of-notifications.js +15 -0
- package/dist/database/run-ast.js +10 -14
- package/dist/database/seeds/05-activity.yaml +0 -1
- package/dist/database/system-data/collections/collections.yaml +4 -0
- package/dist/database/system-data/fields/activity.yaml +3 -0
- package/dist/database/system-data/fields/dashboards.yaml +3 -1
- package/dist/database/system-data/fields/flows.yaml +21 -0
- package/dist/database/system-data/fields/notifications.yaml +3 -1
- package/dist/database/system-data/fields/operations.yaml +19 -0
- package/dist/database/system-data/fields/panels.yaml +3 -1
- package/dist/database/system-data/fields/shares.yaml +3 -1
- package/dist/database/system-data/fields/users.yaml +2 -4
- package/dist/database/system-data/relations/relations.yaml +20 -0
- package/dist/env.d.ts +1 -1
- package/dist/env.js +167 -12
- package/dist/exceptions/index.d.ts +1 -0
- package/dist/exceptions/index.js +1 -0
- package/dist/exceptions/invalid-provider.d.ts +4 -0
- package/dist/exceptions/invalid-provider.js +10 -0
- package/dist/exceptions/range-not-satisfiable.d.ts +2 -2
- package/dist/exceptions/range-not-satisfiable.js +5 -1
- package/dist/extensions.d.ts +3 -0
- package/dist/extensions.js +73 -20
- package/dist/flows.d.ts +17 -0
- package/dist/flows.js +310 -0
- package/dist/messenger.d.ts +24 -0
- package/dist/messenger.js +64 -0
- package/dist/middleware/graphql.js +2 -1
- package/dist/operations/condition/index.d.ts +6 -0
- package/dist/operations/condition/index.js +15 -0
- package/dist/operations/item-create/index.d.ts +8 -0
- package/dist/operations/item-create/index.js +40 -0
- package/dist/operations/item-delete/index.d.ts +9 -0
- package/dist/operations/item-delete/index.js +45 -0
- package/dist/operations/item-read/index.d.ts +9 -0
- package/dist/operations/item-read/index.js +45 -0
- package/dist/operations/item-update/index.d.ts +10 -0
- package/dist/operations/item-update/index.js +50 -0
- package/dist/operations/log/index.d.ts +5 -0
- package/dist/operations/log/index.js +14 -0
- package/dist/operations/mail/index.d.ts +7 -0
- package/dist/operations/mail/index.js +16 -0
- package/dist/operations/notification/index.d.ts +8 -0
- package/dist/operations/notification/index.js +39 -0
- package/dist/operations/request/index.d.ts +9 -0
- package/dist/operations/request/index.js +14 -0
- package/dist/operations/sleep/index.d.ts +5 -0
- package/dist/operations/sleep/index.js +9 -0
- package/dist/operations/transform/index.d.ts +5 -0
- package/dist/operations/transform/index.js +10 -0
- package/dist/operations/trigger/index.d.ts +6 -0
- package/dist/operations/trigger/index.js +21 -0
- package/dist/services/activity.d.ts +1 -2
- package/dist/services/activity.js +10 -10
- package/dist/services/assets.js +27 -1
- package/dist/services/authentication.d.ts +2 -2
- package/dist/services/authentication.js +11 -8
- package/dist/services/authorization.js +12 -0
- package/dist/services/fields.js +15 -8
- package/dist/services/flows.d.ts +14 -0
- package/dist/services/flows.js +42 -0
- package/dist/services/graphql.js +56 -33
- package/dist/services/import-export.d.ts +1 -1
- package/dist/services/import-export.js +13 -12
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +2 -0
- package/dist/services/items.d.ts +3 -3
- package/dist/services/items.js +25 -2
- package/dist/services/mail/index.js +2 -1
- package/dist/services/notifications.d.ts +2 -1
- package/dist/services/notifications.js +4 -3
- package/dist/services/operations.d.ts +14 -0
- package/dist/services/operations.js +42 -0
- package/dist/services/payload.d.ts +2 -2
- package/dist/services/payload.js +8 -7
- package/dist/services/users.d.ts +4 -0
- package/dist/services/users.js +20 -0
- package/dist/services/webhooks.d.ts +2 -0
- package/dist/services/webhooks.js +8 -7
- package/dist/types/events.d.ts +18 -0
- package/dist/types/events.js +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/apply-query.js +31 -4
- package/dist/utils/apply-snapshot.d.ts +3 -3
- package/dist/utils/apply-snapshot.js +64 -49
- package/dist/utils/construct-flow-tree.d.ts +2 -0
- package/dist/utils/construct-flow-tree.js +31 -0
- package/dist/utils/get-accountability-for-role.d.ts +7 -0
- package/dist/utils/get-accountability-for-role.js +36 -0
- package/dist/utils/get-ast-from-query.js +1 -7
- package/dist/utils/get-default-value.js +4 -3
- package/dist/utils/get-permissions.d.ts +1 -1
- package/dist/utils/get-permissions.js +9 -8
- package/dist/utils/get-schema.js +2 -1
- package/dist/utils/get-snapshot.js +22 -4
- package/dist/utils/operation-options.d.ts +3 -0
- package/dist/utils/operation-options.js +45 -0
- package/dist/utils/parse-json.d.ts +5 -0
- package/dist/utils/parse-json.js +19 -0
- package/dist/utils/sanitize-query.d.ts +1 -2
- package/dist/utils/sanitize-query.js +6 -5
- package/dist/utils/validate-keys.d.ts +6 -0
- package/dist/utils/validate-keys.js +28 -0
- package/dist/utils/validate-query.js +1 -1
- package/dist/webhooks.d.ts +2 -0
- package/dist/webhooks.js +17 -2
- package/package.json +18 -14
- package/dist/types/activity.d.ts +0 -9
- package/dist/types/activity.js +0 -13
- package/example.env +0 -202
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.noproto = exports.parseJSON = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Run JSON.parse, but ignore `__proto__` properties. This prevents prototype pollution attacks
|
|
6
|
+
*/
|
|
7
|
+
function parseJSON(input) {
|
|
8
|
+
if (String(input).includes('__proto__')) {
|
|
9
|
+
return JSON.parse(input, noproto);
|
|
10
|
+
}
|
|
11
|
+
return JSON.parse(input);
|
|
12
|
+
}
|
|
13
|
+
exports.parseJSON = parseJSON;
|
|
14
|
+
function noproto(key, value) {
|
|
15
|
+
if (key !== '__proto__') {
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.noproto = noproto;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { Query } from '@directus/shared/types';
|
|
2
|
-
import { Accountability } from '@directus/shared/types';
|
|
1
|
+
import { Accountability, Query } from '@directus/shared/types';
|
|
3
2
|
export declare function sanitizeQuery(rawQuery: Record<string, any>, accountability?: Accountability | null): Query;
|
|
@@ -4,10 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.sanitizeQuery = void 0;
|
|
7
|
+
const utils_1 = require("@directus/shared/utils");
|
|
7
8
|
const lodash_1 = require("lodash");
|
|
8
9
|
const logger_1 = __importDefault(require("../logger"));
|
|
9
10
|
const types_1 = require("../types");
|
|
10
|
-
const
|
|
11
|
+
const parse_json_1 = require("./parse-json");
|
|
11
12
|
function sanitizeQuery(rawQuery, accountability) {
|
|
12
13
|
const query = {};
|
|
13
14
|
if (rawQuery.limit !== undefined) {
|
|
@@ -82,7 +83,7 @@ function sanitizeAggregate(rawAggregate) {
|
|
|
82
83
|
let aggregate = rawAggregate;
|
|
83
84
|
if (typeof rawAggregate === 'string') {
|
|
84
85
|
try {
|
|
85
|
-
aggregate =
|
|
86
|
+
aggregate = (0, parse_json_1.parseJSON)(rawAggregate);
|
|
86
87
|
}
|
|
87
88
|
catch {
|
|
88
89
|
logger_1.default.warn('Invalid value passed for filter query parameter.');
|
|
@@ -100,7 +101,7 @@ function sanitizeFilter(rawFilter, accountability) {
|
|
|
100
101
|
let filters = rawFilter;
|
|
101
102
|
if (typeof rawFilter === 'string') {
|
|
102
103
|
try {
|
|
103
|
-
filters =
|
|
104
|
+
filters = (0, parse_json_1.parseJSON)(rawFilter);
|
|
104
105
|
}
|
|
105
106
|
catch {
|
|
106
107
|
logger_1.default.warn('Invalid value passed for filter query parameter.');
|
|
@@ -135,7 +136,7 @@ function sanitizeDeep(deep, accountability) {
|
|
|
135
136
|
const result = {};
|
|
136
137
|
if (typeof deep === 'string') {
|
|
137
138
|
try {
|
|
138
|
-
deep =
|
|
139
|
+
deep = (0, parse_json_1.parseJSON)(deep);
|
|
139
140
|
}
|
|
140
141
|
catch {
|
|
141
142
|
logger_1.default.warn('Invalid value passed for deep query parameter.');
|
|
@@ -169,7 +170,7 @@ function sanitizeAlias(rawAlias) {
|
|
|
169
170
|
let alias = rawAlias;
|
|
170
171
|
if (typeof rawAlias === 'string') {
|
|
171
172
|
try {
|
|
172
|
-
alias =
|
|
173
|
+
alias = (0, parse_json_1.parseJSON)(rawAlias);
|
|
173
174
|
}
|
|
174
175
|
catch (err) {
|
|
175
176
|
logger_1.default.warn('Invalid value passed for alias query parameter.');
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SchemaOverview } from '@directus/shared/types';
|
|
2
|
+
import { PrimaryKey } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Validate keys based on its type
|
|
5
|
+
*/
|
|
6
|
+
export declare function validateKeys(schema: SchemaOverview, collection: string, keyField: string, keys: PrimaryKey | PrimaryKey[]): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.validateKeys = void 0;
|
|
7
|
+
const exceptions_1 = require("../exceptions");
|
|
8
|
+
const uuid_validate_1 = __importDefault(require("uuid-validate"));
|
|
9
|
+
/**
|
|
10
|
+
* Validate keys based on its type
|
|
11
|
+
*/
|
|
12
|
+
function validateKeys(schema, collection, keyField, keys) {
|
|
13
|
+
if (Array.isArray(keys)) {
|
|
14
|
+
for (const key of keys) {
|
|
15
|
+
validateKeys(schema, collection, keyField, key);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
const primaryKeyFieldType = schema.collections[collection].fields[keyField].type;
|
|
20
|
+
if (primaryKeyFieldType === 'uuid' && !(0, uuid_validate_1.default)(String(keys))) {
|
|
21
|
+
throw new exceptions_1.ForbiddenException();
|
|
22
|
+
}
|
|
23
|
+
else if (primaryKeyFieldType === 'integer' && !Number.isInteger(Number(keys))) {
|
|
24
|
+
throw new exceptions_1.ForbiddenException();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.validateKeys = validateKeys;
|
|
@@ -104,7 +104,7 @@ function validateFilterPrimitive(value, key) {
|
|
|
104
104
|
false) {
|
|
105
105
|
throw new exceptions_1.InvalidQueryException(`The filter value for "${key}" has to be a string, number, or boolean`);
|
|
106
106
|
}
|
|
107
|
-
if (typeof value === 'number' && (Number.isNaN(value) ||
|
|
107
|
+
if (typeof value === 'number' && (Number.isNaN(value) || value > Number.MAX_SAFE_INTEGER)) {
|
|
108
108
|
throw new exceptions_1.InvalidQueryException(`The filter value for "${key}" is not a valid number`);
|
|
109
109
|
}
|
|
110
110
|
if (typeof value === 'string' && value.length === 0) {
|
package/dist/webhooks.d.ts
CHANGED
package/dist/webhooks.js
CHANGED
|
@@ -3,16 +3,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.unregister = exports.register = void 0;
|
|
6
|
+
exports.unregister = exports.register = exports.reload = exports.init = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const database_1 = __importDefault(require("./database"));
|
|
9
9
|
const emitter_1 = __importDefault(require("./emitter"));
|
|
10
10
|
const logger_1 = __importDefault(require("./logger"));
|
|
11
11
|
const services_1 = require("./services");
|
|
12
12
|
const get_schema_1 = require("./utils/get-schema");
|
|
13
|
+
const messenger_1 = require("./messenger");
|
|
13
14
|
let registered = [];
|
|
14
|
-
async function
|
|
15
|
+
async function init() {
|
|
16
|
+
await register();
|
|
17
|
+
const messenger = (0, messenger_1.getMessenger)();
|
|
18
|
+
messenger.subscribe('webhooks', (event) => {
|
|
19
|
+
if (event.type === 'reload') {
|
|
20
|
+
reload();
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.init = init;
|
|
25
|
+
async function reload() {
|
|
15
26
|
unregister();
|
|
27
|
+
await register();
|
|
28
|
+
}
|
|
29
|
+
exports.reload = reload;
|
|
30
|
+
async function register() {
|
|
16
31
|
const webhookService = new services_1.WebhooksService({ knex: (0, database_1.default)(), schema: await (0, get_schema_1.getSchema)() });
|
|
17
32
|
const webhooks = await webhookService.readByQuery({ filter: { status: { _eq: 'active' } } });
|
|
18
33
|
for (const webhook of webhooks) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "directus",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.12.0",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"homepage": "https://github.com/directus/directus#readme",
|
|
6
6
|
"description": "Directus is a real-time API and App dashboard for managing SQL database content.",
|
|
@@ -73,21 +73,20 @@
|
|
|
73
73
|
"files": [
|
|
74
74
|
"dist",
|
|
75
75
|
"LICENSE",
|
|
76
|
-
"README.md"
|
|
77
|
-
"example.env"
|
|
76
|
+
"README.md"
|
|
78
77
|
],
|
|
79
78
|
"dependencies": {
|
|
80
79
|
"@aws-sdk/client-ses": "^3.40.0",
|
|
81
|
-
"@directus/app": "9.
|
|
82
|
-
"@directus/drive": "9.
|
|
83
|
-
"@directus/drive-azure": "9.
|
|
84
|
-
"@directus/drive-gcs": "9.
|
|
85
|
-
"@directus/drive-s3": "9.
|
|
86
|
-
"@directus/extensions-sdk": "9.
|
|
87
|
-
"@directus/format-title": "9.
|
|
88
|
-
"@directus/schema": "9.
|
|
89
|
-
"@directus/shared": "9.
|
|
90
|
-
"@directus/specs": "9.
|
|
80
|
+
"@directus/app": "9.12.0",
|
|
81
|
+
"@directus/drive": "9.12.0",
|
|
82
|
+
"@directus/drive-azure": "9.12.0",
|
|
83
|
+
"@directus/drive-gcs": "9.12.0",
|
|
84
|
+
"@directus/drive-s3": "9.12.0",
|
|
85
|
+
"@directus/extensions-sdk": "9.12.0",
|
|
86
|
+
"@directus/format-title": "9.12.0",
|
|
87
|
+
"@directus/schema": "9.12.0",
|
|
88
|
+
"@directus/shared": "9.12.0",
|
|
89
|
+
"@directus/specs": "9.12.0",
|
|
91
90
|
"@godaddy/terminus": "^4.9.0",
|
|
92
91
|
"@rollup/plugin-alias": "^3.1.9",
|
|
93
92
|
"@rollup/plugin-virtual": "^2.0.3",
|
|
@@ -112,8 +111,10 @@
|
|
|
112
111
|
"execa": "^5.1.1",
|
|
113
112
|
"exifr": "^7.1.2",
|
|
114
113
|
"express": "^4.17.1",
|
|
114
|
+
"fast-redact": "^3.1.1",
|
|
115
115
|
"flat": "^5.0.2",
|
|
116
116
|
"fs-extra": "^10.0.0",
|
|
117
|
+
"globby": "^11.0.4",
|
|
117
118
|
"graphql": "^15.5.0",
|
|
118
119
|
"graphql-compose": "^9.0.1",
|
|
119
120
|
"helmet": "^4.6.0",
|
|
@@ -131,6 +132,7 @@
|
|
|
131
132
|
"lodash": "^4.17.21",
|
|
132
133
|
"macos-release": "^2.4.1",
|
|
133
134
|
"marked": "^4.0.3",
|
|
135
|
+
"micromustache": "^8.0.3",
|
|
134
136
|
"mime-types": "^2.1.31",
|
|
135
137
|
"ms": "^2.1.3",
|
|
136
138
|
"nanoid": "^3.1.23",
|
|
@@ -171,7 +173,7 @@
|
|
|
171
173
|
"sqlite3": "^5.0.6",
|
|
172
174
|
"tedious": "^13.0.0"
|
|
173
175
|
},
|
|
174
|
-
"gitHead": "
|
|
176
|
+
"gitHead": "4d63fba50a7cf199e89423365a515e99cecf4ebf",
|
|
175
177
|
"devDependencies": {
|
|
176
178
|
"@types/async": "3.2.10",
|
|
177
179
|
"@types/body-parser": "1.19.2",
|
|
@@ -183,9 +185,11 @@
|
|
|
183
185
|
"@types/express": "4.17.13",
|
|
184
186
|
"@types/express-pino-logger": "4.0.3",
|
|
185
187
|
"@types/express-session": "1.17.4",
|
|
188
|
+
"@types/fast-redact": "^3.0.1",
|
|
186
189
|
"@types/flat": "5.0.2",
|
|
187
190
|
"@types/fs-extra": "9.0.13",
|
|
188
191
|
"@types/inquirer": "8.1.3",
|
|
192
|
+
"@types/ioredis": "^4.28.10",
|
|
189
193
|
"@types/jest": "27.4.1",
|
|
190
194
|
"@types/js-yaml": "4.0.5",
|
|
191
195
|
"@types/json2csv": "5.0.3",
|
package/dist/types/activity.d.ts
DELETED
package/dist/types/activity.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Action = void 0;
|
|
4
|
-
var Action;
|
|
5
|
-
(function (Action) {
|
|
6
|
-
Action["CREATE"] = "create";
|
|
7
|
-
Action["UPDATE"] = "update";
|
|
8
|
-
Action["DELETE"] = "delete";
|
|
9
|
-
Action["REVERT"] = "revert";
|
|
10
|
-
Action["COMMENT"] = "comment";
|
|
11
|
-
Action["UPLOAD"] = "upload";
|
|
12
|
-
Action["LOGIN"] = "login";
|
|
13
|
-
})(Action = exports.Action || (exports.Action = {}));
|
package/example.env
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
####################################################################################################
|
|
2
|
-
# General
|
|
3
|
-
|
|
4
|
-
HOST="0.0.0.0"
|
|
5
|
-
PORT=8055
|
|
6
|
-
PUBLIC_URL="http://localhost:8055"
|
|
7
|
-
LOG_LEVEL="info"
|
|
8
|
-
LOG_STYLE="pretty"
|
|
9
|
-
|
|
10
|
-
####################################################################################################
|
|
11
|
-
# Database
|
|
12
|
-
|
|
13
|
-
## These match the databases defined in the docker-compose file in the root of this repo
|
|
14
|
-
|
|
15
|
-
## Postgres
|
|
16
|
-
DB_CLIENT="pg"
|
|
17
|
-
DB_HOST="localhost"
|
|
18
|
-
DB_PORT=5100
|
|
19
|
-
DB_DATABASE="directus"
|
|
20
|
-
DB_USER="postgres"
|
|
21
|
-
DB_PASSWORD="secret"
|
|
22
|
-
|
|
23
|
-
## CockroachDB
|
|
24
|
-
# DB_CLIENT="cockroachdb"
|
|
25
|
-
# DB_HOST="localhost"
|
|
26
|
-
# DB_PORT=5113
|
|
27
|
-
# DB_DATABASE="directus"
|
|
28
|
-
# DB_USER="root"
|
|
29
|
-
# DB_PASSWORD=""
|
|
30
|
-
|
|
31
|
-
## MySQL 8
|
|
32
|
-
# DB_CLIENT="mysql"
|
|
33
|
-
# DB_HOST="localhost"
|
|
34
|
-
# DB_PORT=5101
|
|
35
|
-
# DB_DATABASE="directus"
|
|
36
|
-
# DB_USER="root"
|
|
37
|
-
# DB_PASSWORD="secret"
|
|
38
|
-
|
|
39
|
-
## MariaDB
|
|
40
|
-
# DB_CLIENT="mysql"
|
|
41
|
-
# DB_HOST="localhost"
|
|
42
|
-
# DB_PORT=5102
|
|
43
|
-
# DB_DATABASE="directus"
|
|
44
|
-
# DB_USER="root"
|
|
45
|
-
# DB_PASSWORD="secret"
|
|
46
|
-
|
|
47
|
-
## MS SQL
|
|
48
|
-
# DB_CLIENT="mssql"
|
|
49
|
-
# DB_HOST="localhost"
|
|
50
|
-
# DB_PORT=5103
|
|
51
|
-
# DB_DATABASE="directus"
|
|
52
|
-
# DB_USER="sa"
|
|
53
|
-
# DB_PASSWORD="Test@123"
|
|
54
|
-
|
|
55
|
-
## OracleDB
|
|
56
|
-
# DB_CLIENT="oracledb"
|
|
57
|
-
# DB_CONNECT_STRING="localhost:5104/XE"
|
|
58
|
-
# DB_USER="secretsysuser"
|
|
59
|
-
# DB_PASSWORD="secretpassword"
|
|
60
|
-
|
|
61
|
-
## SQLite Example
|
|
62
|
-
# DB_CLIENT="sqlite3"
|
|
63
|
-
# DB_FILENAME="./data.db"
|
|
64
|
-
|
|
65
|
-
## MySQL 5.7
|
|
66
|
-
# DB_CLIENT="mysql"
|
|
67
|
-
# DB_HOST="localhost"
|
|
68
|
-
# DB_PORT=5102
|
|
69
|
-
# DB_DATABASE="directus"
|
|
70
|
-
# DB_USER="root"
|
|
71
|
-
# DB_PASSWORD="secret"
|
|
72
|
-
|
|
73
|
-
####################################################################################################
|
|
74
|
-
# Rate Limiting
|
|
75
|
-
|
|
76
|
-
RATE_LIMITER_ENABLED=true
|
|
77
|
-
|
|
78
|
-
RATE_LIMITER_POINTS=50
|
|
79
|
-
RATE_LIMITER_DURATION=1
|
|
80
|
-
|
|
81
|
-
RATE_LIMITER_STORE=memory
|
|
82
|
-
# memory | redis | memcache
|
|
83
|
-
|
|
84
|
-
# RATE_LIMITER_REDIS="redis://@127.0.0.1:5105"
|
|
85
|
-
|
|
86
|
-
# RATE_LIMITER_MEMCACHE="localhost:5109"
|
|
87
|
-
####################################################################################################
|
|
88
|
-
# Caching
|
|
89
|
-
|
|
90
|
-
CACHE_ENABLED=true
|
|
91
|
-
CACHE_TTL="30m"
|
|
92
|
-
CACHE_NAMESPACE="directus-cache"
|
|
93
|
-
CACHE_AUTO_PURGE=true
|
|
94
|
-
|
|
95
|
-
# memory | redis | memcache
|
|
96
|
-
CACHE_STORE=memory
|
|
97
|
-
|
|
98
|
-
ASSETS_CACHE_TTL="30m"
|
|
99
|
-
|
|
100
|
-
# CACHE_REDIS="redis://@127.0.0.1:5105"
|
|
101
|
-
|
|
102
|
-
# CACHE_MEMCACHE="localhost:5109"
|
|
103
|
-
|
|
104
|
-
####################################################################################################
|
|
105
|
-
# File Storage
|
|
106
|
-
|
|
107
|
-
STORAGE_LOCATIONS="local"
|
|
108
|
-
# CSV of names
|
|
109
|
-
|
|
110
|
-
STORAGE_LOCAL_DRIVER="local"
|
|
111
|
-
STORAGE_LOCAL_ROOT="./uploads"
|
|
112
|
-
|
|
113
|
-
## S3 Example (location name: DigitalOcean)
|
|
114
|
-
# STORAGE_DIGITALOCEAN_DRIVER="s3"
|
|
115
|
-
# STORAGE_DIGITALOCEAN_KEY="abcdef"
|
|
116
|
-
# STORAGE_DIGITALOCEAN_SECRET="ghijkl"
|
|
117
|
-
# STORAGE_DIGITALOCEAN_ENDPOINT="ams3.digitaloceanspaces.com"
|
|
118
|
-
# STORAGE_DIGITALOCEAN_BUCKET="my-files"
|
|
119
|
-
# STORAGE_DIGITALOCEAN_REGION="ams3"
|
|
120
|
-
|
|
121
|
-
## Google Cloud Storage Example (location name: Google)
|
|
122
|
-
# STORAGE_GOOGLE_DRIVER="gcs"
|
|
123
|
-
# STORAGE_GOOGLE_KEY_FILENAME="abcdef"
|
|
124
|
-
# STORAGE_GOOGLE_BUCKET="my-files"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
## CSV of additional metadata keys
|
|
128
|
-
# FILE_METADATA_ALLOW_LIST=
|
|
129
|
-
|
|
130
|
-
####################################################################################################
|
|
131
|
-
# Security
|
|
132
|
-
|
|
133
|
-
KEY="xxxxxxx-xxxxxx-xxxxxxxx-xxxxxxxxxx"
|
|
134
|
-
SECRET="abcdef"
|
|
135
|
-
ACCESS_TOKEN_TTL="15m"
|
|
136
|
-
REFRESH_TOKEN_TTL="7d"
|
|
137
|
-
REFRESH_TOKEN_COOKIE_SECURE="false"
|
|
138
|
-
REFRESH_TOKEN_COOKIE_SAME_SITE="lax"
|
|
139
|
-
REFRESH_TOKEN_COOKIE_NAME="directus_refresh_token"
|
|
140
|
-
|
|
141
|
-
CORS_ENABLED="true"
|
|
142
|
-
CORS_ORIGIN="true"
|
|
143
|
-
CORS_METHODS=GET,POST,PATCH,DELETE
|
|
144
|
-
CORS_ALLOWED_HEADERS=Content-Type,Authorization
|
|
145
|
-
CORS_EXPOSED_HEADERS=Content-Range
|
|
146
|
-
CORS_CREDENTIALS="true"
|
|
147
|
-
CORS_MAX_AGE=18000
|
|
148
|
-
|
|
149
|
-
####################################################################################################
|
|
150
|
-
# Argon2
|
|
151
|
-
|
|
152
|
-
# HASH_MEMORY_COST=81920
|
|
153
|
-
# HASH_HASH_LENGTH=32
|
|
154
|
-
# HASH_TIME_COST=10
|
|
155
|
-
# HASH_PARALLELISM=2
|
|
156
|
-
# HASH_TYPE=2
|
|
157
|
-
# HASH_ASSOCIATED_DATA=foo
|
|
158
|
-
|
|
159
|
-
####################################################################################################
|
|
160
|
-
# Auth Providers
|
|
161
|
-
|
|
162
|
-
# AUTH_PROVIDERS="github"
|
|
163
|
-
|
|
164
|
-
# AUTH_GITHUB_DRIVER="oauth2"
|
|
165
|
-
# AUTH_GITHUB_CLIENT_ID="73e...4b"
|
|
166
|
-
# AUTH_GITHUB_CLIENT_SECRET="b9...98"
|
|
167
|
-
# AUTH_GITHUB_AUTHORIZE_URL="https://github.com/login/oauth/authorize"
|
|
168
|
-
# AUTH_GITHUB_ACCESS_URL="https://github.com/login/oauth/access_token"
|
|
169
|
-
# AUTH_GITHUB_PROFILE_URL="https://api.github.com/user"
|
|
170
|
-
# AUTH_GITHUB_ALLOW_PUBLIC_REGISTRATION="false"
|
|
171
|
-
# AUTH_GITHUB_DEFAULT_ROLE_ID="82424427-c9d4-4289-8bc5-ed1bf8422c90"
|
|
172
|
-
# AUTH_GITHUB_ICON="github"
|
|
173
|
-
# AUTH_GITHUB_EMAIL_KEY="false"
|
|
174
|
-
# AUTH_GITHUB_IDENTIFIER_KEY="login"
|
|
175
|
-
|
|
176
|
-
####################################################################################################
|
|
177
|
-
# Extensions
|
|
178
|
-
|
|
179
|
-
EXTENSIONS_PATH="./extensions"
|
|
180
|
-
|
|
181
|
-
####################################################################################################
|
|
182
|
-
# Email
|
|
183
|
-
|
|
184
|
-
EMAIL_FROM="no-reply@directus.io"
|
|
185
|
-
EMAIL_TRANSPORT="sendmail"
|
|
186
|
-
|
|
187
|
-
## Email (Sendmail Transport)
|
|
188
|
-
EMAIL_SENDMAIL_NEW_LINE="unix"
|
|
189
|
-
EMAIL_SENDMAIL_PATH="/usr/sbin/sendmail"
|
|
190
|
-
|
|
191
|
-
## Email (SMTP Transport)
|
|
192
|
-
# EMAIL_SMTP_POOL=true
|
|
193
|
-
# EMAIL_SMTP_HOST="localhost"
|
|
194
|
-
# EMAIL_SMTP_PORT=465
|
|
195
|
-
# EMAIL_SMTP_SECURE=false # Use TLS
|
|
196
|
-
# EMAIL_SMTP_IGNORE_TLS=false
|
|
197
|
-
# EMAIL_SMTP_USER="username"
|
|
198
|
-
# EMAIL_SMTP_PASSWORD="password"
|
|
199
|
-
|
|
200
|
-
## Email (Mailgun Transport)
|
|
201
|
-
# EMAIL_MAILGUN_API_KEY="key-1234123412341234"
|
|
202
|
-
# EMAIL_MAILGUN_DOMAIN="a domain name from https://app.mailgun.com/app/sending/domains"
|