@directus/app 9.2.1 → 9.2.2

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.
Files changed (36) hide show
  1. package/dist/@directus_extensions-sdk.8ea452b9.js +1 -0
  2. package/dist/assets/ar-SA.c00c6e31.js +1 -0
  3. package/dist/assets/bg-BG.829738a5.js +2 -0
  4. package/dist/assets/collections.112ce182.js +106 -0
  5. package/dist/assets/{config-options.22fa054d.js → config-options.5af53e35.js} +9 -9
  6. package/dist/assets/{creating-extensions.079592a2.js → creating-extensions.49b1b5b4.js} +1 -1
  7. package/dist/assets/en-GB.a560f5a5.js +1 -0
  8. package/dist/assets/{filter-rules.69ad62df.js → filter-rules.92c31ebd.js} +3 -3
  9. package/dist/assets/fr-FR.77439bb4.js +1 -0
  10. package/dist/assets/glossary.ce1fac8f.js +1 -0
  11. package/dist/assets/hi-IN.cb56b66b.js +1 -0
  12. package/dist/assets/{index.be725ecc.js → index.381a6a16.js} +2 -2
  13. package/dist/assets/{index.2ca0b263.css → index.405a95ad.css} +1 -1
  14. package/dist/assets/index.e4d39c2f.css +1 -0
  15. package/dist/assets/{input-rich-text-html.f15deff9.css → input-rich-text-html.4429e856.css} +1 -1
  16. package/dist/assets/{input-rich-text-html.5c9d23de.js → input-rich-text-html.b7a7a6ed.js} +45 -42
  17. package/dist/assets/{it-IT.14bfc0b6.js → it-IT.19d8b79f.js} +1 -1
  18. package/dist/assets/panels.69a015fa.js +65 -0
  19. package/dist/assets/{pl-PL.fcac44cc.js → pl-PL.56b0e1f6.js} +1 -1
  20. package/dist/assets/th-TH.2f12c6dc.js +2 -0
  21. package/dist/assets/uk-UA.da837737.js +1 -0
  22. package/dist/{index.b3ccaf38.js → index.3ee50ed6.js} +32 -32
  23. package/dist/index.html +2 -2
  24. package/package.json +6 -6
  25. package/dist/@directus_extensions-sdk.4ac735b2.js +0 -1
  26. package/dist/assets/ar-SA.c14aed74.js +0 -1
  27. package/dist/assets/bg-BG.2ccc4340.js +0 -2
  28. package/dist/assets/collections.e46a0b43.js +0 -104
  29. package/dist/assets/en-GB.361d696e.js +0 -1
  30. package/dist/assets/fr-FR.0db3601e.js +0 -1
  31. package/dist/assets/glossary.b333571a.js +0 -1
  32. package/dist/assets/hi-IN.f686e98f.js +0 -1
  33. package/dist/assets/index.fa30dc11.css +0 -1
  34. package/dist/assets/panels.43ad39c3.js +0 -1
  35. package/dist/assets/th-TH.51bd50db.js +0 -2
  36. package/dist/assets/uk-UA.c8fb0083.js +0 -1
@@ -0,0 +1,106 @@
1
+ import{r as a,p as r,q as h,w as s,B as e,t as n,P as t}from"./vendor.764dd834.js";const d={class:"markdown-body"},p={class:"two-up"},u={class:"left"},_=t("Collections are the individual collections of items, similar to tables in a database. Changes to collections will alter the schema of the database. "),g=t("Learn more about Collections"),m=t("."),f=e("div",{class:"right"},[e("p",null,[e("div",{class:"table-of-contents"},[e("ul",null,[e("li",null,[e("a",{href:"#the-collection-object"},"The Collection Object")]),e("li",null,[e("a",{href:"#list-collections"},"List Collections")]),e("li",null,[e("a",{href:"#retrieve-a-collection"},"Retrieve a Collection")]),e("li",null,[e("a",{href:"#create-a-collection"},"Create a Collection")]),e("li",null,[e("a",{href:"#update-a-collection"},"Update a Collection")]),e("li",null,[e("a",{href:"#delete-a-collection"},"Delete a Collection")])])])])],-1),j=e("hr",null,null,-1),y=e("h2",{id:"the-collection-object"},[t("The Collection Object "),e("a",{class:"header-anchor",href:"#the-collection-object"},"#")],-1),b={class:"two-up"},v={class:"left"},q=e("div",{class:"definitions"},[e("p",null,[e("code",null,"collection"),t(),e("strong",null,"string"),e("br"),t(" Name of the collection. This matches the table name in the database.")])],-1),w=e("h4",{id:"meta"},[t("Meta "),e("a",{class:"header-anchor",href:"#meta"},"#")],-1),T=e("p",null,"Directus metadata, primarily used in the Admin App.",-1),x={class:"definitions"},A=e("p",null,[e("code",null,"collection"),t(),e("strong",null,"string"),e("br"),t(" Name of the collection. This matches the table name in the database.")],-1),C=e("p",null,[e("code",null,"icon"),t(),e("strong",null,"string"),e("br"),t(" Icon displayed in the Admin App when working with this collection.")],-1),E=e("p",null,[e("code",null,"note"),t(),e("strong",null,"string"),e("br"),t(" Short description displayed in the Admin App.")],-1),S=e("p",null,[e("code",null,"display_template"),t(),e("strong",null,"string"),e("br"),t(" How items in this collection should be displayed when viewed relationally in the Admin App.")],-1),k=e("p",null,[e("code",null,"hidden"),t(),e("strong",null,"boolean"),e("br"),t(" Whether or not this collection is hidden in the Admin App.")],-1),P=e("p",null,[e("code",null,"singleton"),t(),e("strong",null,"boolean"),e("br"),t(" Whether or not this collection is treated as a singleton.")],-1),R=e("p",null,[e("code",null,"translations"),t(),e("strong",null,"array"),e("br"),t(" How this collection\u2019s name is displayed in the different languages in the Admin App.")],-1),L=e("p",null,[e("code",null,"archive_field"),t(),e("strong",null,"string"),e("br"),t(" What field in the collection holds the archived state.")],-1),W=e("p",null,[e("code",null,"archive_value"),t(),e("strong",null,"string"),e("br"),t(" What value the archive field should be set to when archiving an item.")],-1),O=e("p",null,[e("code",null,"unarchive_value"),t(),e("strong",null,"string"),e("br"),t(" What value the archive field should be set to when unarchiving an item.")],-1),Q=e("p",null,[e("code",null,"archive_app_filter"),t(),e("strong",null,"boolean"),e("br"),t(" Whether or not the Admin App should allow the user to view archived items.")],-1),D=e("p",null,[e("code",null,"sort_field"),t(),e("strong",null,"boolean"),e("br"),t(" What field holds the sort value on the collection. The Admin App uses this to allow drag-and-drop manual sorting.")],-1),B=e("code",null,"accountability",-1),G=t(),H=e("strong",null,"string",-1),I=e("br",null,null,-1),N=t(" What data is tracked. One of "),M=e("code",null,"all",-1),U=t(", "),V=e("code",null,"activity",-1),Y=t(". See "),z=t("Accountability"),F=t(" for more information."),J=e("code",null,"item_duplication_fields",-1),K=t(),X=e("strong",null,"array",-1),Z=e("br",null,null,-1),$=t(" What fields are duplicated during \u201CSave as copy\u201D action of an item in this collection. See "),ee=t("Duplication"),te=t(" for more information."),se=e("code",null,"group",-1),le=t(),ne=e("strong",null,"string",-1),oe=e("br",null,null,-1),ae=t(" The name of the parent collection. This is used in "),ce=t("grouping/nesting of collections"),ie=t("."),re=e("code",null,"sort",-1),he=t(),de=e("strong",null,"number",-1),pe=e("br",null,null,-1),ue=t(" What sort order of the collection relative to other collections of the same level. This is used in "),_e=t("sorting of collections"),ge=t("."),me=e("p",null,[e("code",null,"collapse"),t(),e("strong",null,"string"),e("br"),t(" What is the default behavior of this collection or \u201Cfolder\u201D collection when it has nested collections. One of "),e("code",null,"open"),t(", "),e("code",null,"closed"),t(", "),e("code",null,"locked"),t(".")],-1),fe=e("h4",{id:"schema"},[t("Schema "),e("a",{class:"header-anchor",href:"#schema"},"#")],-1),je=e("p",null,"\u201CRaw\u201D database information. Based on the database vendor used, different information might be returned. The following are available for all drivers.",-1),ye=e("div",{class:"definitions"},[e("p",null,[e("code",null,"name"),t(),e("strong",null,"string"),e("br"),t(" The table name.")]),e("p",null,[e("code",null,"comment"),t(),e("strong",null,"string"),e("br"),t(" The table comment.")])],-1),be={class:"tip hint"},ve=t("\u201Cfolder\u201D collections do not hold any data"),qe=t(", hence their schema would be "),we=e("code",null,"null",-1),Te=t("."),xe=e("div",{class:"right"},[e("pre",null,[e("code",{class:"language-json"},[t(`{
2
+ `),e("span",{class:"hljs-attr"},'"collection"'),t(": "),e("span",{class:"hljs-string"},'"articles"'),t(`,
3
+ `),e("span",{class:"hljs-attr"},'"meta"'),t(`: {
4
+ `),e("span",{class:"hljs-attr"},'"collection"'),t(": "),e("span",{class:"hljs-string"},'"articles"'),t(`,
5
+ `),e("span",{class:"hljs-attr"},'"icon"'),t(": "),e("span",{class:"hljs-string"},'"article"'),t(`,
6
+ `),e("span",{class:"hljs-attr"},'"note"'),t(": "),e("span",{class:"hljs-string"},'"Blog posts"'),t(`,
7
+ `),e("span",{class:"hljs-attr"},'"display_template"'),t(": "),e("span",{class:"hljs-string"},'"{{ title }}"'),t(`,
8
+ `),e("span",{class:"hljs-attr"},'"hidden"'),t(": "),e("span",{class:"hljs-literal"},"false"),t(`,
9
+ `),e("span",{class:"hljs-attr"},'"singleton"'),t(": "),e("span",{class:"hljs-literal"},"false"),t(`,
10
+ `),e("span",{class:"hljs-attr"},'"translations"'),t(`: [
11
+ {
12
+ `),e("span",{class:"hljs-attr"},'"language"'),t(": "),e("span",{class:"hljs-string"},'"en-US"'),t(`,
13
+ `),e("span",{class:"hljs-attr"},'"translation"'),t(": "),e("span",{class:"hljs-string"},'"Articles"'),t(`
14
+ },
15
+ {
16
+ `),e("span",{class:"hljs-attr"},'"language"'),t(": "),e("span",{class:"hljs-string"},'"nl-NL"'),t(`,
17
+ `),e("span",{class:"hljs-attr"},'"translation"'),t(": "),e("span",{class:"hljs-string"},'"Artikelen"'),t(`
18
+ }
19
+ ],
20
+ `),e("span",{class:"hljs-attr"},'"archive_field"'),t(": "),e("span",{class:"hljs-string"},'"status"'),t(`,
21
+ `),e("span",{class:"hljs-attr"},'"archive_value"'),t(": "),e("span",{class:"hljs-string"},'"archived"'),t(`,
22
+ `),e("span",{class:"hljs-attr"},'"unarchive_value"'),t(": "),e("span",{class:"hljs-string"},'"draft"'),t(`,
23
+ `),e("span",{class:"hljs-attr"},'"archive_app_filter"'),t(": "),e("span",{class:"hljs-literal"},"true"),t(`,
24
+ `),e("span",{class:"hljs-attr"},'"sort_field"'),t(": "),e("span",{class:"hljs-string"},'"sort"'),t(`,
25
+ `),e("span",{class:"hljs-attr"},'"item_duplication_fields"'),t(": "),e("span",{class:"hljs-literal"},"null"),t(`,
26
+ `),e("span",{class:"hljs-attr"},'"sort"'),t(": "),e("span",{class:"hljs-number"},"1"),t(`
27
+ },
28
+ `),e("span",{class:"hljs-attr"},'"schema"'),t(`: {
29
+ `),e("span",{class:"hljs-attr"},'"name"'),t(": "),e("span",{class:"hljs-string"},'"pages"'),t(`,
30
+ `),e("span",{class:"hljs-attr"},'"comment"'),t(": "),e("span",{class:"hljs-literal"},"null"),t(`
31
+ }
32
+ }
33
+ `)])])],-1),Ae=e("hr",null,null,-1),Ce=e("h2",{id:"list-collections"},[t("List Collections "),e("a",{class:"header-anchor",href:"#list-collections"},"#")],-1),Ee=e("p",null,"List the available collections.",-1),Se={class:"two-up"},ke=e("div",{class:"left"},[e("h3",{id:"query-parameters"},[t("Query Parameters "),e("a",{class:"header-anchor",href:"#query-parameters"},"#")]),e("p",null,"This endpoint doesn\u2019t currently support any query parameters."),e("h3",{id:"returns"},[t("Returns "),e("a",{class:"header-anchor",href:"#returns"},"#")]),e("p",null,[t("An array of "),e("a",{href:"#the-collection-object"},"collection objects"),t(".")])],-1),Pe={class:"right"},Re=e("h3",{id:"rest-api"},[t("REST API "),e("a",{class:"header-anchor",href:"#rest-api"},"#")],-1),Le=e("pre",null,[e("code",null,`GET /collections
34
+ SEARCH /collections
35
+ `)],-1),We=t("Learn more about SEARCH ->"),Oe=e("h3",{id:"graphql"},[t("GraphQL "),e("a",{class:"header-anchor",href:"#graphql"},"#")],-1),Qe=e("pre",null,[e("code",null,`POST /graphql/system
36
+ `)],-1),De=e("pre",null,[e("code",{class:"language-graphql"},[e("span",{class:"hljs-keyword"},"type"),e("span",{class:"hljs-type"}," Query"),t(` {
37
+ collections: [directus_collections]
38
+ }
39
+ `)])],-1),Be=e("h5",{id:"example"},[t("Example "),e("a",{class:"header-anchor",href:"#example"},"#")],-1),Ge=e("pre",null,[e("code",{class:"language-graphql"},[e("span",{class:"hljs-keyword"},"query"),t(` {
40
+ collections {
41
+ `),e("span",{class:"hljs-keyword"},"..."),t(`
42
+ }
43
+ }
44
+ `)])],-1),He=e("hr",null,null,-1),Ie=e("h2",{id:"retrieve-a-collection"},[t("Retrieve a Collection "),e("a",{class:"header-anchor",href:"#retrieve-a-collection"},"#")],-1),Ne=e("p",null,"Retrieve a single collection by table name.",-1),Me=e("div",{class:"two-up"},[e("div",{class:"left"},[e("h3",{id:"query-parameters-2"},[t("Query Parameters "),e("a",{class:"header-anchor",href:"#query-parameters-2"},"#")]),e("p",null,"This endpoint doesn\u2019t currently support any query parameters."),e("h3",{id:"returns-2"},[t("Returns "),e("a",{class:"header-anchor",href:"#returns-2"},"#")]),e("p",null,[t("A "),e("a",{href:"#the-collection-object"},"collection object"),t(".")])]),e("div",{class:"right"},[e("h3",{id:"rest-api-2"},[t("REST API "),e("a",{class:"header-anchor",href:"#rest-api-2"},"#")]),e("pre",null,[e("code",null,`GET /collections/:collection
45
+ `)]),e("h5",{id:"example-2"},[t("Example "),e("a",{class:"header-anchor",href:"#example-2"},"#")]),e("pre",null,[e("code",null,`GET /collections/articles
46
+ `)]),e("h3",{id:"graphql-2"},[t("GraphQL "),e("a",{class:"header-anchor",href:"#graphql-2"},"#")]),e("pre",null,[e("code",null,`POST /graphql/system
47
+ `)]),e("pre",null,[e("code",{class:"language-graphql"},[e("span",{class:"hljs-keyword"},"type"),e("span",{class:"hljs-type"}," Query"),t(` {
48
+ collections_by_name(name:`),e("span",{class:"hljs-type"}," String"),t(`!): directus_collections
49
+ }
50
+ `)])]),e("h5",{id:"example-3"},[t("Example "),e("a",{class:"header-anchor",href:"#example-3"},"#")]),e("pre",null,[e("code",{class:"language-graphql"},[e("span",{class:"hljs-keyword"},"query"),t(` {
51
+ collections_by_name(name: `),e("span",{class:"hljs-string"},'"articles"'),t(`) {
52
+ `),e("span",{class:"hljs-keyword"},"..."),t(`
53
+ }
54
+ }
55
+ `)])])])],-1),Ue=e("hr",null,null,-1),Ve=e("h2",{id:"create-a-collection"},[t("Create a Collection "),e("a",{class:"header-anchor",href:"#create-a-collection"},"#")],-1),Ye=e("p",null,"Create a new Collection. This will create a new table in the database as well.",-1),ze={class:"two-up"},Fe={class:"left"},Je=e("h3",{id:"query-parameters-3"},[t("Query Parameters "),e("a",{class:"header-anchor",href:"#query-parameters-3"},"#")],-1),Ke=e("p",null,"This endpoint doesn\u2019t currently support any query parameters.",-1),Xe=e("h3",{id:"request-body"},[t("Request Body "),e("a",{class:"header-anchor",href:"#request-body"},"#")],-1),Ze=e("p",null,[t("The "),e("code",null,"collection"),t(" property is required, all other properties of the "),e("a",{href:"#the-collection-object"},"collection object"),t(" are optional.")],-1),$e=t("You are able to provide an array of "),et=e("code",null,"fields",-1),tt=t(" to be created during the creation of the collection. See the "),st=t("fields object"),lt=t(" for more information on what properties are available in a field."),nt=e("h3",{id:"returns-3"},[t("Returns "),e("a",{class:"header-anchor",href:"#returns-3"},"#")],-1),ot=e("p",null,[t("The "),e("a",{href:"#the-collection-object"},"collection object"),t(" for the collection created in this request.")],-1),at={class:"tip hint"},ct=t("Make sure to pass an empty object for schema ("),it=e("code",null,"schema: {}",-1),rt=t(") when creating collections. Alternatively, you can omit it entirely or use "),ht=e("code",null,"schema: null",-1),dt=t(" to create "),pt=t("\u201Cfolder\u201D collections"),ut=t("."),_t=e("div",{class:"right"},[e("h3",{id:"rest-api-3"},[t("REST API "),e("a",{class:"header-anchor",href:"#rest-api-3"},"#")]),e("pre",null,[e("code",null,`POST /collections
56
+ `)]),e("h5",{id:"example-4"},[t("Example "),e("a",{class:"header-anchor",href:"#example-4"},"#")]),e("pre",null,[e("code",{class:"language-json"},[e("span",{class:"hljs-comment"},"// POST /collections"),t(`
57
+
58
+ {
59
+ `),e("span",{class:"hljs-attr"},'"collection"'),t(": "),e("span",{class:"hljs-string"},'"testimonials"'),t(`,
60
+ `),e("span",{class:"hljs-attr"},'"meta"'),t(`: {
61
+ `),e("span",{class:"hljs-attr"},'"icon"'),t(": "),e("span",{class:"hljs-string"},'"format_quote"'),t(`
62
+ }
63
+ }
64
+ `)])]),e("h3",{id:"graphql-3"},[t("GraphQL "),e("a",{class:"header-anchor",href:"#graphql-3"},"#")]),e("pre",null,[e("code",null,`POST /graphql/system
65
+ `)]),e("pre",null,[e("code",{class:"language-graphql"},[e("span",{class:"hljs-keyword"},"type"),e("span",{class:"hljs-type"}," Mutation"),t(` {
66
+ create_collections_item(data: directus_collections): directus_collections
67
+ }
68
+ `)])]),e("h5",{id:"example-5"},[t("Example "),e("a",{class:"header-anchor",href:"#example-5"},"#")]),e("pre",null,[e("code",{class:"language-graphql"},[e("span",{class:"hljs-keyword"},"mutation"),t(` {
69
+ create_collections_item(data: {
70
+ collection: `),e("span",{class:"hljs-string"},'"testimonials"'),t(`,
71
+ meta: {
72
+ icon: `),e("span",{class:"hljs-string"},'"format_quote"'),t(`
73
+ }
74
+ }) {
75
+ `),e("span",{class:"hljs-keyword"},"..."),t(`
76
+ }
77
+ }
78
+ `)])])],-1),gt=e("hr",null,null,-1),mt=e("h2",{id:"update-a-collection"},[t("Update a Collection "),e("a",{class:"header-anchor",href:"#update-a-collection"},"#")],-1),ft=e("p",null,"Update the metadata for an existing collection.",-1),jt=e("div",{class:"two-up"},[e("div",{class:"left"},[e("h3",{id:"query-parameters-4"},[t("Query Parameters "),e("a",{class:"header-anchor",href:"#query-parameters-4"},"#")]),e("p",null,"This endpoint doesn\u2019t currently support any query parameters."),e("h3",{id:"request-body-2"},[t("Request Body "),e("a",{class:"header-anchor",href:"#request-body-2"},"#")]),e("p",null,[t("You can only update the "),e("code",null,"meta"),t(" values of the "),e("a",{href:"#the-collection-object"},"collection object"),t(". Updating the collection name is not supported at this time.")]),e("h3",{id:"returns-4"},[t("Returns "),e("a",{class:"header-anchor",href:"#returns-4"},"#")]),e("p",null,[t("The "),e("a",{href:"#the-collection-object"},"collection object"),t(" for the updated collection in this request.")])]),e("div",{class:"right"},[e("h3",{id:"rest-api-4"},[t("REST API "),e("a",{class:"header-anchor",href:"#rest-api-4"},"#")]),e("pre",null,[e("code",null,`PATCH /collections/:collection
79
+ `)]),e("h5",{id:"example-6"},[t("Example "),e("a",{class:"header-anchor",href:"#example-6"},"#")]),e("pre",null,[e("code",{class:"language-json"},[e("span",{class:"hljs-comment"},"// PATCH /collections/testimonials"),t(`
80
+
81
+ {
82
+ `),e("span",{class:"hljs-attr"},'"meta"'),t(`: {
83
+ `),e("span",{class:"hljs-attr"},'"note"'),t(": "),e("span",{class:"hljs-string"},'"Short quotes from happy customers."'),t(`
84
+ }
85
+ }
86
+ `)])]),e("h3",{id:"graphql-4"},[t("GraphQL "),e("a",{class:"header-anchor",href:"#graphql-4"},"#")]),e("pre",null,[e("code",null,`POST /graphql/system
87
+ `)]),e("pre",null,[e("code",{class:"language-graphql"},[e("span",{class:"hljs-keyword"},"type"),e("span",{class:"hljs-type"}," Mutation"),t(` {
88
+ update_collections_item(collection:`),e("span",{class:"hljs-type"}," String"),t(`!, data: update_directus_collections_input!): directus_collections
89
+ }
90
+ `)])]),e("h5",{id:"example-7"},[t("Example "),e("a",{class:"header-anchor",href:"#example-7"},"#")]),e("pre",null,[e("code",{class:"language-graphql"},[e("span",{class:"hljs-keyword"},"mutation"),t(` {
91
+ update_collections_item(collection: `),e("span",{class:"hljs-string"},'"testimonials"'),t(", data: { meta: { note: "),e("span",{class:"hljs-string"},'"Short quotes from happy customers."'),t(` } }) {
92
+ collection
93
+ }
94
+ }
95
+ `)])])])],-1),yt=e("hr",null,null,-1),bt=e("h2",{id:"delete-a-collection"},[t("Delete a Collection "),e("a",{class:"header-anchor",href:"#delete-a-collection"},"#")],-1),vt=e("p",null,"Delete a collection.",-1),qt=e("div",{class:"two-up"},[e("div",{class:"left"},[e("div",{class:"danger hint"},[e("div",{class:"hint-title"},"Destructive"),e("p",null,"Be aware, this will delete the table from the database, including all items in it. This action can\u2019t be undone.")])]),e("div",{class:"right"},[e("h3",{id:"rest-api-5"},[t("REST API "),e("a",{class:"header-anchor",href:"#rest-api-5"},"#")]),e("pre",null,[e("code",null,`DELETE /collections/:collection
96
+ `)]),e("h5",{id:"example-8"},[t("Example "),e("a",{class:"header-anchor",href:"#example-8"},"#")]),e("pre",null,[e("code",null,`DELETE /collections/articles
97
+ `)]),e("h3",{id:"graphql-5"},[t("GraphQL "),e("a",{class:"header-anchor",href:"#graphql-5"},"#")]),e("pre",null,[e("code",null,`POST /graphql/system
98
+ `)]),e("pre",null,[e("code",{class:"language-graphql"},[e("span",{class:"hljs-keyword"},"type"),e("span",{class:"hljs-type"}," Mutation"),t(` {
99
+ delete_collections_item(collection:`),e("span",{class:"hljs-type"}," String"),t(`!): delete_collection
100
+ }
101
+ `)])]),e("h5",{id:"example-9"},[t("Example "),e("a",{class:"header-anchor",href:"#example-9"},"#")]),e("pre",null,[e("code",{class:"language-graphql"},[e("span",{class:"hljs-keyword"},"mutation"),t(` {
102
+ delete_collections_item(collection: `),e("span",{class:"hljs-string"},'"articles"'),t(`) {
103
+ collection
104
+ }
105
+ }
106
+ `)])])])],-1),wt=e("hr",null,null,-1),Et={setup(Tt,{expose:c}){const o={title:"Collections",modularExtension:!1,pageClass:"page-reference"};return c({frontmatter:o}),(xt,At)=>{const l=a("router-link"),i=a("DocsWrapper");return r(),h(i,{frontmatter:o},{default:s(()=>[e("div",d,[e("div",p,[e("div",u,[e("blockquote",null,[e("p",null,[_,n(l,{to:"/docs/getting-started/glossary/#collections"},{default:s(()=>[g]),_:1}),m])])]),f]),j,y,e("div",b,[e("div",v,[q,w,T,e("div",x,[A,C,E,S,k,P,R,L,W,O,Q,D,e("p",null,[B,G,H,I,N,M,U,V,Y,n(l,{to:"/docs/configuration/data-model/#accountability"},{default:s(()=>[z]),_:1}),F]),e("p",null,[J,K,X,Z,$,n(l,{to:"/docs/configuration/data-model/#duplication"},{default:s(()=>[ee]),_:1}),te]),e("p",null,[se,le,ne,oe,ae,n(l,{to:"/docs/configuration/data-model/#sorting-grouping"},{default:s(()=>[ce]),_:1}),ie]),e("p",null,[re,he,de,pe,ue,n(l,{to:"/docs/configuration/data-model/#sorting-grouping"},{default:s(()=>[_e]),_:1}),ge]),me]),fe,je,ye,e("div",be,[e("p",null,[n(l,{to:"/docs/configuration/data-model/#sorting-grouping"},{default:s(()=>[ve]),_:1}),qe,we,Te])])]),xe]),Ae,Ce,Ee,e("div",Se,[ke,e("div",Pe,[Re,Le,e("p",null,[n(l,{to:"/docs/reference/introduction/#search-http-method"},{default:s(()=>[We]),_:1})]),Oe,Qe,De,Be,Ge])]),He,Ie,Ne,Me,Ue,Ve,Ye,e("div",ze,[e("div",Fe,[Je,Ke,Xe,Ze,e("p",null,[$e,et,tt,n(l,{to:"/docs/reference/system/fields/#the-fields-object"},{default:s(()=>[st]),_:1}),lt]),nt,ot,e("div",at,[e("p",null,[ct,it,rt,ht,dt,n(l,{to:"/docs/configuration/data-model/#sorting-grouping"},{default:s(()=>[pt]),_:1}),ut])])]),_t]),gt,mt,ft,jt,yt,bt,vt,qt,wt])]),_:1})}}};export{Et as default};
@@ -1,12 +1,12 @@
1
1
  import{r as s,p as r,q as i,w as n,B as l,t as o,P as e}from"./vendor.764dd834.js";const c={class:"markdown-body"},h=l("blockquote",null,[l("p",null,"Environment variables are used for all configuration within a Directus project. These variables can be defined in a number of ways, which we cover below.")],-1),_=l("p",null,[l("div",{class:"table-of-contents"},[l("ul",null,[l("li",null,[l("a",{href:"#configuration-files"},"Configuration Files")]),l("li",null,[l("a",{href:"#environment-variable-files"},"Environment Variable Files")]),l("li",null,[l("a",{href:"#type-casting-and-nesting"},"Type Casting and Nesting")]),l("li",null,[l("a",{href:"#environment-syntax-prefix"},"Environment Syntax Prefix")]),l("li",null,[l("a",{href:"#general"},"General")]),l("li",null,[l("a",{href:"#database"},"Database")]),l("li",null,[l("a",{href:"#security"},"Security")]),l("li",null,[l("a",{href:"#cors"},"CORS")]),l("li",null,[l("a",{href:"#rate-limiting"},"Rate Limiting")]),l("li",null,[l("a",{href:"#cache"},"Cache")]),l("li",null,[l("a",{href:"#file-storage"},"File Storage")]),l("li",null,[l("a",{href:"#assets"},"Assets")]),l("li",null,[l("a",{href:"#authentication"},"Authentication")]),l("li",null,[l("a",{href:"#extensions"},"Extensions")]),l("li",null,[l("a",{href:"#email"},"Email")]),l("li",null,[l("a",{href:"#admin-account"},"Admin Account")]),l("li",null,[l("a",{href:"#telemetry"},"Telemetry")])])])],-1),p=l("h2",{id:"configuration-files"},[e("Configuration Files "),l("a",{class:"header-anchor",href:"#configuration-files"},"#")],-1),f=l("p",null,[e("By default, Directus will read the "),l("code",null,".env"),e(" file located next to your project\u2019s "),l("code",null,"package.json"),e(" (typically in the root folder of your project) for its configuration. You can change this path and filename by setting the "),l("code",null,"CONFIG_PATH"),e(" environment variable before starting Directus. For example:")],-1),m=l("pre",null,[l("code",{class:"language-bash"},[e("CONFIG_PATH="),l("span",{class:"hljs-string"},'"/path/to/config.js"'),e(` npx directus start
2
- `)])],-1),E=l("p",null,[e("In case you prefer using a configuration file instead of environment variables, you can also use the "),l("code",null,"CONFIG_PATH"),e(" environment variable to instruct Directus to use a local configuration file instead of environment variables. The config file can be one of the following formats:")],-1),g=l("ul",null,[l("li",null,[l("a",{href:"#env"},".env")]),l("li",null,[l("a",{href:"#config-json"},"config.json")]),l("li",null,[l("a",{href:"#config-yaml"},"config.yaml")]),l("li",null,[l("a",{href:"#config-js"},"config.js")])],-1),A=l("h3",{id:".env"},[e(".env "),l("a",{class:"header-anchor",href:"#.env"},"#")],-1),T=l("p",null,"If the config path has no file extension, or a file extension that\u2019s not one of the other supported formats, Directus will try reading the file config path as environment variables. This has the following structure:",-1),R=l("pre",null,[l("code",null,`PORT=8055
2
+ `)])],-1),E=l("p",null,[e("In case you prefer using a configuration file instead of environment variables, you can also use the "),l("code",null,"CONFIG_PATH"),e(" environment variable to instruct Directus to use a local configuration file instead of environment variables. The config file can be one of the following formats:")],-1),A=l("ul",null,[l("li",null,[l("a",{href:"#env"},".env")]),l("li",null,[l("a",{href:"#config-json"},"config.json")]),l("li",null,[l("a",{href:"#config-yaml"},"config.yaml")]),l("li",null,[l("a",{href:"#config-js"},"config.js")])],-1),g=l("h3",{id:".env"},[e(".env "),l("a",{class:"header-anchor",href:"#.env"},"#")],-1),T=l("p",null,"If the config path has no file extension, or a file extension that\u2019s not one of the other supported formats, Directus will try reading the file config path as environment variables. This has the following structure:",-1),R=l("pre",null,[l("code",null,`PORT=8055
3
3
 
4
4
  DB_CLIENT="pg"
5
5
  DB_HOST="localhost"
6
6
  DB_PORT=5432
7
7
 
8
8
  etc
9
- `)],-1),b=l("h3",{id:"config.json"},[e("config.json "),l("a",{class:"header-anchor",href:"#config.json"},"#")],-1),O=l("p",null,"If you prefer a single JSON file for your configuration, create a JSON file with the environment variables as keys, for example:",-1),S=l("pre",null,[l("code",null,`CONFIG_PATH="/path/to/config.json"
9
+ `)],-1),O=l("h3",{id:"config.json"},[e("config.json "),l("a",{class:"header-anchor",href:"#config.json"},"#")],-1),b=l("p",null,"If you prefer a single JSON file for your configuration, create a JSON file with the environment variables as keys, for example:",-1),S=l("pre",null,[l("code",null,`CONFIG_PATH="/path/to/config.json"
10
10
  `)],-1),D=l("pre",null,[l("code",{class:"language-json"},[e(`{
11
11
  `),l("span",{class:"hljs-attr"},'"PORT"'),e(": "),l("span",{class:"hljs-number"},"8055"),e(`,
12
12
 
@@ -24,7 +24,7 @@ etc
24
24
  `),l("span",{class:"hljs-attr"},"DB_PORT:"),e(),l("span",{class:"hljs-number"},"5432"),e(`
25
25
  `),l("span",{class:"hljs-comment"},"#"),e(`
26
26
  `),l("span",{class:"hljs-comment"},"# etc"),e(`
27
- `)])],-1),v=l("h3",{id:"config.js"},[e("config.js "),l("a",{class:"header-anchor",href:"#config.js"},"#")],-1),w=l("p",null,[e("Using a JavaScript file for your config allows you to dynamically generate the configuration of the project during startup. The JavaScript configuration supports two different formats, either an "),l("strong",null,"Object Structure"),e(" where the key is the environment variable name:")],-1),U=l("pre",null,[l("code",{class:"language-js"},[l("span",{class:"hljs-comment"},"// Object Sytax"),e(`
27
+ `)])],-1),v=l("h3",{id:"config.js"},[e("config.js "),l("a",{class:"header-anchor",href:"#config.js"},"#")],-1),U=l("p",null,[e("Using a JavaScript file for your config allows you to dynamically generate the configuration of the project during startup. The JavaScript configuration supports two different formats, either an "),l("strong",null,"Object Structure"),e(" where the key is the environment variable name:")],-1),w=l("pre",null,[l("code",{class:"language-js"},[l("span",{class:"hljs-comment"},"// Object Sytax"),e(`
28
28
 
29
29
  `),l("span",{class:"hljs-built_in"},"module"),e(`.exports = {
30
30
  `),l("span",{class:"hljs-attr"},"PORT"),e(": "),l("span",{class:"hljs-number"},"8055"),e(`,
@@ -71,7 +71,7 @@ DB_SSL__REJECT_UNAUTHORIZED="false"
71
71
  rejectUnauthorized: false
72
72
  }
73
73
  }
74
- `)],-1),W=l("h2",{id:"environment-syntax-prefix"},[e("Environment Syntax Prefix "),l("a",{class:"header-anchor",href:"#environment-syntax-prefix"},"#")],-1),q=l("p",null,[e("Directus will attempt to "),l("a",{href:"#type-casting-and-nesting"},"automatically type cast environment variables"),e(" based on context clues. If you have a specific need for a given type, you can tell Directus what type to use for the given value by prefixing the value with "),l("code",null,"{type}:"),e(". The following types are available:")],-1),F=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Syntax Prefix"),l("th",null,"Example"),l("th",null,"Output")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"string")]),l("td",null,[l("code",null,"string:value")]),l("td",null,[l("code",null,'"value"')])]),l("tr",null,[l("td",null,[l("code",null,"number")]),l("td",null,[l("code",null,"number:3306")]),l("td",null,[l("code",null,"3306")])]),l("tr",null,[l("td",null,[l("code",null,"regex")]),l("td",null,[l("code",null,"regex:\\.example\\.com$")]),l("td",null,[l("code",null,"/\\.example\\.com$/")])]),l("tr",null,[l("td",null,[l("code",null,"array")]),l("td",null,[l("code",null,"array:https://example.com,https://example2.com"),e(),l("br"),e(),l("code",null,"array:string:https://example.com,regex:\\.example3\\.com$")]),l("td",null,[l("code",null,'["https://example.com", "https://example2.com"]'),e(),l("br"),e(),l("code",null,'["https://example.com", "https://example2.com", /\\.example3\\.com$/]')])])])],-1),Y=l("hr",null,null,-1),K=l("h2",{id:"general"},[e("General "),l("a",{class:"header-anchor",href:"#general"},"#")],-1),z=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CONFIG_PATH")]),l("td",null,[e("Where your config file is located. See "),l("a",{href:"#configuration-files"},"Configuration Files")]),l("td",null,[l("code",null,".env")])]),l("tr",null,[l("td",null,[l("code",null,"PORT")]),l("td",null,"What port to run the API under."),l("td",null,[l("code",null,"8055")])]),l("tr",null,[l("td",null,[l("code",null,"PUBLIC_URL"),l("sup",null,"[1]")]),l("td",null,"URL where your API can be reached on the web."),l("td",null,[l("code",null,"/")])]),l("tr",null,[l("td",null,[l("code",null,"LOG_LEVEL")]),l("td",null,[e("What level of detail to log. One of "),l("code",null,"fatal"),e(", "),l("code",null,"error"),e(", "),l("code",null,"warn"),e(", "),l("code",null,"info"),e(", "),l("code",null,"debug"),e(", "),l("code",null,"trace"),e(" or "),l("code",null,"silent"),e(".")]),l("td",null,[l("code",null,"info")])]),l("tr",null,[l("td",null,[l("code",null,"LOG_STYLE")]),l("td",null,[e("Render the logs human readable (pretty) or as JSON. One of "),l("code",null,"pretty"),e(", "),l("code",null,"raw"),e(".")]),l("td",null,[l("code",null,"pretty")])]),l("tr",null,[l("td",null,[l("code",null,"MAX_PAYLOAD_SIZE")]),l("td",null,"Controls the maximum request body size. Accepts number of bytes, or human readable string."),l("td",null,[l("code",null,"100kb")])]),l("tr",null,[l("td",null,[l("code",null,"ROOT_REDIRECT")]),l("td",null,[e("Where to redirect to when navigating to "),l("code",null,"/"),e(". Accepts a relative path, absolute URL, or "),l("code",null,"false"),e(" to disable.")]),l("td",null,[l("code",null,"./admin")])]),l("tr",null,[l("td",null,[l("code",null,"SERVE_APP")]),l("td",null,[e("Whether or not to serve the Admin App under "),l("code",null,"/admin"),e(".")]),l("td",null,[l("code",null,"true")])])])],-1),X=l("p",null,[l("sup",null,"[1]"),e(" The PUBLIC_URL value is used for things like OAuth redirects, forgot-password emails, and logos that needs to be publicly available on the internet.")],-1),J=l("h2",{id:"database"},[e("Database "),l("a",{class:"header-anchor",href:"#database"},"#")],-1),Z=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"DB_CLIENT")]),l("td",null,[l("strong",null,"Required"),e(". What database client to use. One of "),l("code",null,"pg"),e(" or "),l("code",null,"postgres"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", "),l("code",null,"mssql"),e(", or "),l("code",null,"sqlite3"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_HOST")]),l("td",null,[e("Database host. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_PORT")]),l("td",null,[e("Database port. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_DATABASE")]),l("td",null,[e("Database name. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_USER")]),l("td",null,[e("Database user. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_PASSWORD")]),l("td",null,[e("Database user\u2019s password. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_FILENAME")]),l("td",null,[e("Where to read/write the SQLite database. "),l("strong",null,"Required"),e(" when using "),l("code",null,"sqlite3"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_CONNECTION_STRING")]),l("td",null,[e("When using "),l("code",null,"pg"),e(", you can submit a connection string instead of individual properties. Using this will ignore any of the other connection settings.")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_POOL_*")]),l("td",null,[e("Pooling settings. Passed on to "),l("a",{href:"https://github.com/vincit/tarn.js#usage",target:"_blank",rel:"noopener noreferrer"},[e("the "),l("code",null,"tarn.js")]),e(" library.")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_EXCLUDE_TABLES")]),l("td",null,"CSV of tables you want Directus to ignore completely"),l("td",null,[l("code",null,"spatial_ref_sys")])]),l("tr",null,[l("td",null,[l("code",null,"DB_CHARSET")]),l("td",null,"Charset/collation to use in the connection to MySQL/MariaDB"),l("td",null,[l("code",null,"UTF8_GENERAL_CI")])])])],-1),$=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Additional Database Variables"),l("p",null,[e("All "),l("code",null,"DB_*"),e(" environment variables are passed to the "),l("code",null,"connection"),e(" configuration of a "),l("a",{href:"http://knexjs.org",target:"_blank",rel:"noopener noreferrer"},[l("code",null,"Knex"),e(" instance")]),e(". Based on your project\u2019s needs, you can extend the "),l("code",null,"DB_*"),e(" environment variables with any config you need to pass to the database instance.")])],-1),Q=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Pooling"),l("p",null,[e("All the "),l("code",null,"DB_POOL_"),e(" prefixed options are passed to "),l("a",{href:"https://github.com/vincit/tarn.js#usage",target:"_blank",rel:"noopener noreferrer"},[l("code",null,"tarn.js")]),e(" through "),l("a",{href:"http://knexjs.org/#Installation-pooling",target:"_blank",rel:"noopener noreferrer"},"Knex")])],-1),ll=l("h2",{id:"security"},[e("Security "),l("a",{class:"header-anchor",href:"#security"},"#")],-1),el=l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])],-1),nl=l("tr",null,[l("td",null,[l("code",null,"KEY")]),l("td",null,"Unique identifier for the project."),l("td",null,"\u2013")],-1),tl=l("tr",null,[l("td",null,[l("code",null,"SECRET")]),l("td",null,"Secret string for the project."),l("td",null,"\u2013")],-1),ol=l("tr",null,[l("td",null,[l("code",null,"ACCESS_TOKEN_TTL")]),l("td",null,"The duration that the access token is valid."),l("td",null,[l("code",null,"15m")])],-1),ul=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_TTL")]),l("td",null,"The duration that the refresh token is valid, and also how long users stay logged-in to the App."),l("td",null,[l("code",null,"7d")])],-1),sl=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_DOMAIN")]),l("td",null,"Which domain to use for the refresh cookie. Useful for development mode."),l("td",null,"\u2013")],-1),al=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_SECURE")]),l("td",null,"Whether or not to use a secure cookie for the refresh token in cookie mode."),l("td",null,[l("code",null,"false")])],-1),dl=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_SAME_SITE")]),l("td",null,[e("Value for "),l("code",null,"sameSite"),e(" in the refresh token cookie when in cookie mode.")]),l("td",null,[l("code",null,"lax")])],-1),rl=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_NAME")]),l("td",null,"Name of refresh token cookie ."),l("td",null,[l("code",null,"directus_refresh_token")])],-1),il=l("td",null,[l("code",null,"PASSWORD_RESET_URL_ALLOW_LIST")],-1),cl=e("List of URLs that can be used "),hl=e("as "),_l=l("code",null,"reset_url",-1),pl=e(" in /password/request"),fl=l("td",null,"\u2013",-1),ml=l("td",null,[l("code",null,"USER_INVITE_URL_ALLOW_LIST")],-1),El=e("List of URLs that can be used "),gl=e("as "),Al=l("code",null,"invite_url",-1),Tl=e(" in /users/invite"),Rl=l("td",null,"\u2013",-1),bl=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Cookie Strictness"),l("p",null,[e("Browser are pretty strict when it comes to third-party cookies. If you\u2019re running into unexpected problems when running your project and API on different domains, make sure to verify your configuration for "),l("code",null,"REFRESH_TOKEN_COOKIE_NAME"),e(", "),l("code",null,"REFRESH_TOKEN_COOKIE_SECURE"),e(" and "),l("code",null,"REFRESH_TOKEN_COOKIE_SAME_SITE"),e(".")])],-1),Ol=l("h3",{id:"hashing"},[e("Hashing "),l("a",{class:"header-anchor",href:"#hashing"},"#")],-1),Sl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"HASH_MEMORY_COST")]),l("td",null,"How much memory to use when generating hashes, in KiB."),l("td",null,[l("code",null,"4096"),e(" (4 MiB)")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_LENGTH")]),l("td",null,"The length of the hash function output in bytes."),l("td",null,[l("code",null,"32")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_TIME_COST")]),l("td",null,"The amount of passes (iterations) used by the hash function. It increases hash strength at the cost of time required to compute."),l("td",null,[l("code",null,"3")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_PARALLELISM")]),l("td",null,[e("The amount of threads to compute the hash on. Each thread has a memory pool with "),l("code",null,"HASH_MEMORY_COST"),e(" size.")]),l("td",null,[l("code",null,"1"),e(" (single thread)")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_TYPE")]),l("td",null,[e("The variant of the hash function ("),l("code",null,"0"),e(": argon2d, "),l("code",null,"1"),e(": argon2i, or "),l("code",null,"2"),e(": argon2id).")]),l("td",null,[l("code",null,"1"),e(" (argon2i)")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_ASSOCIATED_DATA")]),l("td",null,"An extra and optional non-secret value. The value will be included B64 encoded in the parameters portion of the digest."),l("td",null,"\u2013")])])],-1),Dl=e("Argon2\u2019s hashing function is used by Directus for three purposes: 1) hashing user passwords, 2) generating hashes for the "),Il=l("code",null,"Hash",-1),yl=e(" field type in collections, and 3) the "),Cl=e("generate a hash API endpoint"),Ll=e("."),vl=l("p",null,[e("All "),l("code",null,"HASH_*"),e(" environment variable parameters are passed to the "),l("code",null,"argon2.hash"),e(" function. See the "),l("a",{href:"https://github.com/ranisalt/node-argon2/wiki/Options",target:"_blank",rel:"noopener noreferrer"},"node-argon2 library options page"),e(" for reference.")],-1),wl=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Memory Usage"),l("p",null,[e("Modifying "),l("code",null,"HASH_MEMORY_COST"),e(" and/or "),l("code",null,"HASH_PARALLELISM"),e(" will affect the amount of memory directus uses when computing hashes; each thread gets "),l("code",null,"HASH_MEMORY_COST"),e(" amount of memory, so the total additional memory will be these two values multiplied. This may cause out of memory errors, especially when running in containerized environments.")])],-1),Ul=l("h2",{id:"cors"},[e("CORS "),l("a",{class:"header-anchor",href:"#cors"},"#")],-1),Hl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CORS_ENABLED")]),l("td",null,"Whether or not to enable the CORS headers."),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_ORIGIN")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Allow-Origin"),e(" header. Use "),l("code",null,"true"),e(" to match the Origin header, or provide a domain or a CSV of domains for specific access")]),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_METHODS")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Allow-Methods"),e(" header.")]),l("td",null,[l("code",null,"GET,POST,PATCH,DELETE")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_ALLOWED_HEADERS")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Allow-Headers"),e(" header.")]),l("td",null,[l("code",null,"Content-Type,Authorization")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_EXPOSED_HEADERS")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Expose-Headers"),e(" header.")]),l("td",null,[l("code",null,"Content-Range")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_CREDENTIALS")]),l("td",null,[e("Whether or not to send the "),l("code",null,"Access-Control-Allow-Credentials"),e(" header.")]),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_MAX_AGE")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Max-Age"),e(" header.")]),l("td",null,[l("code",null,"18000")])])])],-1),Nl=l("h2",{id:"rate-limiting"},[e("Rate Limiting "),l("a",{class:"header-anchor",href:"#rate-limiting"},"#")],-1),Pl=l("p",null,[e("You can use the built-in rate-limiter to prevent users from hitting the API too much. Simply enabling the rate-limiter will set a default maximum of 50 requests per second, tracked in memory. Once you have multiple copies of Directus running under a load-balancer, or your user base grows so much that memory is no longer a viable place to store the rate limiter information, you can use an external "),l("code",null,"memcache"),e(" or "),l("code",null,"redis"),e(" instance to store the rate limiter data.")],-1),Vl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_ENABLED")]),l("td",null,"Whether or not to enable rate limiting on the API."),l("td",null,[l("code",null,"false")])]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_POINTS")]),l("td",null,"The amount of allowed hits per duration."),l("td",null,[l("code",null,"50")])]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_DURATION")]),l("td",null,"The time window in seconds in which the points are counted."),l("td",null,[l("code",null,"1")])]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_STORE")]),l("td",null,[e("Where to store the rate limiter counts. One of "),l("code",null,"memory"),e(", "),l("code",null,"redis"),e(", or "),l("code",null,"memcache"),e(".")]),l("td",null,[l("code",null,"memory")])])])],-1),Ml=l("p",null,[e("Based on the "),l("code",null,"RATE_LIMITER_STORE"),e(" used, you must also provide the following configurations:")],-1),xl=l("h3",{id:"memory"},[e("Memory "),l("a",{class:"header-anchor",href:"#memory"},"#")],-1),Bl=l("p",null,"No additional configuration required.",-1),jl=l("h3",{id:"redis"},[e("Redis "),l("a",{class:"header-anchor",href:"#redis"},"#")],-1),Gl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS")]),l("td",null,[e("Redis connection string, eg: "),l("code",null,"redis://:authpassword@127.0.0.1:6380/4")]),l("td",null,"\u2014")])])],-1),kl=l("p",null,"Alternatively, you can provide the individual connection parameters:",-1),Wl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS_HOST")]),l("td",null,"Hostname of the Redis instance"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS_PORT")]),l("td",null,"Port of the Redis instance"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS_PASSWORD")]),l("td",null,"Password for your Redis instance"),l("td",null,"\u2013")])])],-1),ql=l("h3",{id:"memcache"},[e("Memcache "),l("a",{class:"header-anchor",href:"#memcache"},"#")],-1),Fl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_MEMCACHE")]),l("td",null,[e("Location of your memcache instance. You can use "),l("a",{href:"#environment-syntax-prefix"},[l("code",null,"array:"),e(" syntax")]),e(", eg: "),l("code",null,"array:<instance-1>,<instance-2>"),e(" for multiple memcache instances.")]),l("td",null,"\u2014")])])],-1),Yl=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Additional Rate Limiter Variables"),l("p",null,[e("All "),l("code",null,"RATE_LIMITER_*"),e(" variables are passed directly to a "),l("code",null,"rate-limiter-flexible"),e(" instance. Depending on your project\u2019s needs, you can extend the above environment variables to configure any of "),l("a",{href:"https://github.com/animir/node-rate-limiter-flexible/wiki/Options",target:"_blank",rel:"noopener noreferrer"},[e("the "),l("code",null,"rate-limiter-flexible"),e(" options")]),e(".")])],-1),Kl=l("h3",{id:"example%3A-basic"},[e("Example: Basic "),l("a",{class:"header-anchor",href:"#example%3A-basic"},"#")],-1),zl=l("pre",null,[l("code",null,`// 10 requests per 5 seconds
74
+ `)],-1),W=l("h2",{id:"environment-syntax-prefix"},[e("Environment Syntax Prefix "),l("a",{class:"header-anchor",href:"#environment-syntax-prefix"},"#")],-1),q=l("p",null,[e("Directus will attempt to "),l("a",{href:"#type-casting-and-nesting"},"automatically type cast environment variables"),e(" based on context clues. If you have a specific need for a given type, you can tell Directus what type to use for the given value by prefixing the value with "),l("code",null,"{type}:"),e(". The following types are available:")],-1),F=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Syntax Prefix"),l("th",null,"Example"),l("th",null,"Output")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"string")]),l("td",null,[l("code",null,"string:value")]),l("td",null,[l("code",null,'"value"')])]),l("tr",null,[l("td",null,[l("code",null,"number")]),l("td",null,[l("code",null,"number:3306")]),l("td",null,[l("code",null,"3306")])]),l("tr",null,[l("td",null,[l("code",null,"regex")]),l("td",null,[l("code",null,"regex:\\.example\\.com$")]),l("td",null,[l("code",null,"/\\.example\\.com$/")])]),l("tr",null,[l("td",null,[l("code",null,"array")]),l("td",null,[l("code",null,"array:https://example.com,https://example2.com"),e(),l("br"),e(),l("code",null,"array:string:https://example.com,regex:\\.example3\\.com$")]),l("td",null,[l("code",null,'["https://example.com", "https://example2.com"]'),e(),l("br"),e(),l("code",null,'["https://example.com", "https://example2.com", /\\.example3\\.com$/]')])])])],-1),Y=l("hr",null,null,-1),K=l("h2",{id:"general"},[e("General "),l("a",{class:"header-anchor",href:"#general"},"#")],-1),z=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CONFIG_PATH")]),l("td",null,[e("Where your config file is located. See "),l("a",{href:"#configuration-files"},"Configuration Files")]),l("td",null,[l("code",null,".env")])]),l("tr",null,[l("td",null,[l("code",null,"PORT")]),l("td",null,"What port to run the API under."),l("td",null,[l("code",null,"8055")])]),l("tr",null,[l("td",null,[l("code",null,"PUBLIC_URL"),l("sup",null,"[1]")]),l("td",null,"URL where your API can be reached on the web."),l("td",null,[l("code",null,"/")])]),l("tr",null,[l("td",null,[l("code",null,"LOG_LEVEL")]),l("td",null,[e("What level of detail to log. One of "),l("code",null,"fatal"),e(", "),l("code",null,"error"),e(", "),l("code",null,"warn"),e(", "),l("code",null,"info"),e(", "),l("code",null,"debug"),e(", "),l("code",null,"trace"),e(" or "),l("code",null,"silent"),e(".")]),l("td",null,[l("code",null,"info")])]),l("tr",null,[l("td",null,[l("code",null,"LOG_STYLE")]),l("td",null,[e("Render the logs human readable (pretty) or as JSON. One of "),l("code",null,"pretty"),e(", "),l("code",null,"raw"),e(".")]),l("td",null,[l("code",null,"pretty")])]),l("tr",null,[l("td",null,[l("code",null,"MAX_PAYLOAD_SIZE")]),l("td",null,"Controls the maximum request body size. Accepts number of bytes, or human readable string."),l("td",null,[l("code",null,"100kb")])]),l("tr",null,[l("td",null,[l("code",null,"ROOT_REDIRECT")]),l("td",null,[e("Where to redirect to when navigating to "),l("code",null,"/"),e(". Accepts a relative path, absolute URL, or "),l("code",null,"false"),e(" to disable.")]),l("td",null,[l("code",null,"./admin")])]),l("tr",null,[l("td",null,[l("code",null,"SERVE_APP")]),l("td",null,[e("Whether or not to serve the Admin App under "),l("code",null,"/admin"),e(".")]),l("td",null,[l("code",null,"true")])])])],-1),X=l("p",null,[l("sup",null,"[1]"),e(" The PUBLIC_URL value is used for things like OAuth redirects, forgot-password emails, and logos that needs to be publicly available on the internet.")],-1),J=l("h2",{id:"database"},[e("Database "),l("a",{class:"header-anchor",href:"#database"},"#")],-1),Z=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"DB_CLIENT")]),l("td",null,[l("strong",null,"Required"),e(". What database client to use. One of "),l("code",null,"pg"),e(" or "),l("code",null,"postgres"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", "),l("code",null,"mssql"),e(", or "),l("code",null,"sqlite3"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_HOST")]),l("td",null,[e("Database host. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_PORT")]),l("td",null,[e("Database port. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_DATABASE")]),l("td",null,[e("Database name. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_USER")]),l("td",null,[e("Database user. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_PASSWORD")]),l("td",null,[e("Database user\u2019s password. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_FILENAME")]),l("td",null,[e("Where to read/write the SQLite database. "),l("strong",null,"Required"),e(" when using "),l("code",null,"sqlite3"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_CONNECTION_STRING")]),l("td",null,[e("When using "),l("code",null,"pg"),e(", you can submit a connection string instead of individual properties. Using this will ignore any of the other connection settings.")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_POOL_*")]),l("td",null,[e("Pooling settings. Passed on to "),l("a",{href:"https://github.com/vincit/tarn.js#usage",target:"_blank",rel:"noopener noreferrer"},[e("the "),l("code",null,"tarn.js")]),e(" library.")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_EXCLUDE_TABLES")]),l("td",null,"CSV of tables you want Directus to ignore completely"),l("td",null,[l("code",null,"spatial_ref_sys")])]),l("tr",null,[l("td",null,[l("code",null,"DB_CHARSET")]),l("td",null,"Charset/collation to use in the connection to MySQL/MariaDB"),l("td",null,[l("code",null,"UTF8_GENERAL_CI")])])])],-1),$=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Additional Database Variables"),l("p",null,[e("All "),l("code",null,"DB_*"),e(" environment variables are passed to the "),l("code",null,"connection"),e(" configuration of a "),l("a",{href:"http://knexjs.org",target:"_blank",rel:"noopener noreferrer"},[l("code",null,"Knex"),e(" instance")]),e(". Based on your project\u2019s needs, you can extend the "),l("code",null,"DB_*"),e(" environment variables with any config you need to pass to the database instance.")])],-1),Q=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Pooling"),l("p",null,[e("All the "),l("code",null,"DB_POOL_"),e(" prefixed options are passed to "),l("a",{href:"https://github.com/vincit/tarn.js#usage",target:"_blank",rel:"noopener noreferrer"},[l("code",null,"tarn.js")]),e(" through "),l("a",{href:"http://knexjs.org/#Installation-pooling",target:"_blank",rel:"noopener noreferrer"},"Knex")])],-1),ll=l("h2",{id:"security"},[e("Security "),l("a",{class:"header-anchor",href:"#security"},"#")],-1),el=l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])],-1),nl=l("tr",null,[l("td",null,[l("code",null,"KEY")]),l("td",null,"Unique identifier for the project."),l("td",null,"\u2013")],-1),tl=l("tr",null,[l("td",null,[l("code",null,"SECRET")]),l("td",null,"Secret string for the project."),l("td",null,"\u2013")],-1),ol=l("tr",null,[l("td",null,[l("code",null,"ACCESS_TOKEN_TTL")]),l("td",null,"The duration that the access token is valid."),l("td",null,[l("code",null,"15m")])],-1),ul=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_TTL")]),l("td",null,"The duration that the refresh token is valid, and also how long users stay logged-in to the App."),l("td",null,[l("code",null,"7d")])],-1),sl=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_DOMAIN")]),l("td",null,"Which domain to use for the refresh cookie. Useful for development mode."),l("td",null,"\u2013")],-1),al=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_SECURE")]),l("td",null,"Whether or not to use a secure cookie for the refresh token in cookie mode."),l("td",null,[l("code",null,"false")])],-1),dl=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_SAME_SITE")]),l("td",null,[e("Value for "),l("code",null,"sameSite"),e(" in the refresh token cookie when in cookie mode.")]),l("td",null,[l("code",null,"lax")])],-1),rl=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_NAME")]),l("td",null,"Name of refresh token cookie ."),l("td",null,[l("code",null,"directus_refresh_token")])],-1),il=l("td",null,[l("code",null,"PASSWORD_RESET_URL_ALLOW_LIST")],-1),cl=e("List of URLs that can be used "),hl=e("as "),_l=l("code",null,"reset_url",-1),pl=e(" in /password/request"),fl=l("td",null,"\u2013",-1),ml=l("td",null,[l("code",null,"USER_INVITE_URL_ALLOW_LIST")],-1),El=e("List of URLs that can be used "),Al=e("as "),gl=l("code",null,"invite_url",-1),Tl=e(" in /users/invite"),Rl=l("td",null,"\u2013",-1),Ol=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Cookie Strictness"),l("p",null,[e("Browser are pretty strict when it comes to third-party cookies. If you\u2019re running into unexpected problems when running your project and API on different domains, make sure to verify your configuration for "),l("code",null,"REFRESH_TOKEN_COOKIE_NAME"),e(", "),l("code",null,"REFRESH_TOKEN_COOKIE_SECURE"),e(" and "),l("code",null,"REFRESH_TOKEN_COOKIE_SAME_SITE"),e(".")])],-1),bl=l("h3",{id:"hashing"},[e("Hashing "),l("a",{class:"header-anchor",href:"#hashing"},"#")],-1),Sl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"HASH_MEMORY_COST")]),l("td",null,"How much memory to use when generating hashes, in KiB."),l("td",null,[l("code",null,"4096"),e(" (4 MiB)")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_LENGTH")]),l("td",null,"The length of the hash function output in bytes."),l("td",null,[l("code",null,"32")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_TIME_COST")]),l("td",null,"The amount of passes (iterations) used by the hash function. It increases hash strength at the cost of time required to compute."),l("td",null,[l("code",null,"3")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_PARALLELISM")]),l("td",null,[e("The amount of threads to compute the hash on. Each thread has a memory pool with "),l("code",null,"HASH_MEMORY_COST"),e(" size.")]),l("td",null,[l("code",null,"1"),e(" (single thread)")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_TYPE")]),l("td",null,[e("The variant of the hash function ("),l("code",null,"0"),e(": argon2d, "),l("code",null,"1"),e(": argon2i, or "),l("code",null,"2"),e(": argon2id).")]),l("td",null,[l("code",null,"1"),e(" (argon2i)")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_ASSOCIATED_DATA")]),l("td",null,"An extra and optional non-secret value. The value will be included B64 encoded in the parameters portion of the digest."),l("td",null,"\u2013")])])],-1),Dl=e("Argon2\u2019s hashing function is used by Directus for three purposes: 1) hashing user passwords, 2) generating hashes for the "),Il=l("code",null,"Hash",-1),yl=e(" field type in collections, and 3) the "),Cl=e("generate a hash API endpoint"),Ll=e("."),vl=l("p",null,[e("All "),l("code",null,"HASH_*"),e(" environment variable parameters are passed to the "),l("code",null,"argon2.hash"),e(" function. See the "),l("a",{href:"https://github.com/ranisalt/node-argon2/wiki/Options",target:"_blank",rel:"noopener noreferrer"},"node-argon2 library options page"),e(" for reference.")],-1),Ul=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Memory Usage"),l("p",null,[e("Modifying "),l("code",null,"HASH_MEMORY_COST"),e(" and/or "),l("code",null,"HASH_PARALLELISM"),e(" will affect the amount of memory directus uses when computing hashes; each thread gets "),l("code",null,"HASH_MEMORY_COST"),e(" amount of memory, so the total additional memory will be these two values multiplied. This may cause out of memory errors, especially when running in containerized environments.")])],-1),wl=l("h2",{id:"cors"},[e("CORS "),l("a",{class:"header-anchor",href:"#cors"},"#")],-1),Hl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CORS_ENABLED")]),l("td",null,"Whether or not to enable the CORS headers."),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_ORIGIN")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Allow-Origin"),e(" header. Use "),l("code",null,"true"),e(" to match the Origin header, or provide a domain or a CSV of domains for specific access")]),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_METHODS")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Allow-Methods"),e(" header.")]),l("td",null,[l("code",null,"GET,POST,PATCH,DELETE")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_ALLOWED_HEADERS")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Allow-Headers"),e(" header.")]),l("td",null,[l("code",null,"Content-Type,Authorization")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_EXPOSED_HEADERS")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Expose-Headers"),e(" header.")]),l("td",null,[l("code",null,"Content-Range")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_CREDENTIALS")]),l("td",null,[e("Whether or not to send the "),l("code",null,"Access-Control-Allow-Credentials"),e(" header.")]),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_MAX_AGE")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Max-Age"),e(" header.")]),l("td",null,[l("code",null,"18000")])])])],-1),Nl=l("h2",{id:"rate-limiting"},[e("Rate Limiting "),l("a",{class:"header-anchor",href:"#rate-limiting"},"#")],-1),Pl=l("p",null,[e("You can use the built-in rate-limiter to prevent users from hitting the API too much. Simply enabling the rate-limiter will set a default maximum of 50 requests per second, tracked in memory. Once you have multiple copies of Directus running under a load-balancer, or your user base grows so much that memory is no longer a viable place to store the rate limiter information, you can use an external "),l("code",null,"memcache"),e(" or "),l("code",null,"redis"),e(" instance to store the rate limiter data.")],-1),Vl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_ENABLED")]),l("td",null,"Whether or not to enable rate limiting on the API."),l("td",null,[l("code",null,"false")])]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_POINTS")]),l("td",null,"The amount of allowed hits per duration."),l("td",null,[l("code",null,"50")])]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_DURATION")]),l("td",null,"The time window in seconds in which the points are counted."),l("td",null,[l("code",null,"1")])]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_STORE")]),l("td",null,[e("Where to store the rate limiter counts. One of "),l("code",null,"memory"),e(", "),l("code",null,"redis"),e(", or "),l("code",null,"memcache"),e(".")]),l("td",null,[l("code",null,"memory")])])])],-1),Ml=l("p",null,[e("Based on the "),l("code",null,"RATE_LIMITER_STORE"),e(" used, you must also provide the following configurations:")],-1),xl=l("h3",{id:"memory"},[e("Memory "),l("a",{class:"header-anchor",href:"#memory"},"#")],-1),Bl=l("p",null,"No additional configuration required.",-1),jl=l("h3",{id:"redis"},[e("Redis "),l("a",{class:"header-anchor",href:"#redis"},"#")],-1),Gl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS")]),l("td",null,[e("Redis connection string, eg: "),l("code",null,"redis://:authpassword@127.0.0.1:6380/4")]),l("td",null,"\u2014")])])],-1),kl=l("p",null,"Alternatively, you can provide the individual connection parameters:",-1),Wl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS_HOST")]),l("td",null,"Hostname of the Redis instance"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS_PORT")]),l("td",null,"Port of the Redis instance"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS_PASSWORD")]),l("td",null,"Password for your Redis instance"),l("td",null,"\u2013")])])],-1),ql=l("h3",{id:"memcache"},[e("Memcache "),l("a",{class:"header-anchor",href:"#memcache"},"#")],-1),Fl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_MEMCACHE")]),l("td",null,[e("Location of your memcache instance. You can use "),l("a",{href:"#environment-syntax-prefix"},[l("code",null,"array:"),e(" syntax")]),e(", eg: "),l("code",null,"array:<instance-1>,<instance-2>"),e(" for multiple memcache instances.")]),l("td",null,"\u2014")])])],-1),Yl=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Additional Rate Limiter Variables"),l("p",null,[e("All "),l("code",null,"RATE_LIMITER_*"),e(" variables are passed directly to a "),l("code",null,"rate-limiter-flexible"),e(" instance. Depending on your project\u2019s needs, you can extend the above environment variables to configure any of "),l("a",{href:"https://github.com/animir/node-rate-limiter-flexible/wiki/Options",target:"_blank",rel:"noopener noreferrer"},[e("the "),l("code",null,"rate-limiter-flexible"),e(" options")]),e(".")])],-1),Kl=l("h3",{id:"example%3A-basic"},[e("Example: Basic "),l("a",{class:"header-anchor",href:"#example%3A-basic"},"#")],-1),zl=l("pre",null,[l("code",null,`// 10 requests per 5 seconds
75
75
 
76
76
  RATE_LIMITER_POINTS="10"
77
77
  RATE_LIMITER_DURATION="5"
@@ -85,7 +85,7 @@ RATE_LIMITER_STORE="redis"
85
85
  RATE_LIMITER_REDIS="redis://@127.0.0.1"
86
86
  `)],-1),Zl=l("h2",{id:"cache"},[e("Cache "),l("a",{class:"header-anchor",href:"#cache"},"#")],-1),$l=l("p",null,"Directus has a built-in data-caching option. Enabling this will cache the output of requests (based on the current user and exact query parameters used) into to configured cache storage location. This drastically improves API performance, as subsequent requests are served straight from this cache. Enabling cache will also make Directus return accurate cache-control headers. Depending on your setup, this will further improve performance by caching the request in middleman servers (like CDNs) and even the browser.",-1),Ql=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Assets Cache"),l("p",null,[e("The cache-control header for the "),l("code",null,"/assets"),e(" endpoint is separate from the regular data-cache. This is useful as it\u2019s often possible to cache assets for far longer than you would cache database content. "),l("a",{href:"#assets"},"Learn More")])],-1),le=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CACHE_ENABLED")]),l("td",null,"Whether or not caching is enabled."),l("td",null,[l("code",null,"false")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_TTL"),l("sup",null,"[1]")]),l("td",null,"How long the cache is persisted."),l("td",null,[l("code",null,"30m")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_CONTROL_S_MAXAGE")]),l("td",null,[e("Whether to not to add the "),l("code",null,"s-maxage"),e(" expiration flag. Set to a number for a custom value")]),l("td",null,[l("code",null,"0")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_AUTO_PURGE"),l("sup",null,"[2]")]),l("td",null,[e("Automatically purge the cache on "),l("code",null,"create"),e(", "),l("code",null,"update"),e(", and "),l("code",null,"delete"),e(" actions.")]),l("td",null,[l("code",null,"false")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_SCHEMA"),l("sup",null,"[3]")]),l("td",null,[e("Whether or not the database schema is cached. One of "),l("code",null,"false"),e(", "),l("code",null,"true")]),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_PERMISSIONS"),l("sup",null,"[3]")]),l("td",null,[e("Whether or not the user permissions are cached. One of "),l("code",null,"false"),e(", "),l("code",null,"true")]),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_NAMESPACE")]),l("td",null,"How to scope the cache data."),l("td",null,[l("code",null,"directus-cache")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_STORE"),l("sup",null,"[4]")]),l("td",null,[e("Where to store the cache data. Either "),l("code",null,"memory"),e(", "),l("code",null,"redis"),e(", or "),l("code",null,"memcache"),e(".")]),l("td",null,[l("code",null,"memory")])])])],-1),ee=l("p",null,[l("sup",null,"[1]"),e(),l("code",null,"CACHE_TTL"),e(" Based on your project\u2019s needs, you might be able to aggressively cache your data, only requiring new data to be fetched every hour or so. This allows you to squeeze the most performance out of your Directus instance. This can be incredibly useful for applications where you have a lot of (public) read-access and where updates aren\u2019t real-time (for example a website). "),l("code",null,"CACHE_TTL"),e(" uses "),l("a",{href:"https://www.npmjs.com/package/ms",target:"_blank",rel:"noopener noreferrer"},[l("code",null,"ms")]),e(" to parse the value, so you configure it using human readable values (like "),l("code",null,"2 days"),e(", "),l("code",null,"7 hrs"),e(", "),l("code",null,"5m"),e(").")],-1),ne=l("p",null,[l("sup",null,"[2]"),e(),l("code",null,"CACHE_AUTO_PURGE"),e(" allows you to keep the Directus API real-time, while still getting the performance benefits on quick subsequent reads.")],-1),te=l("p",null,[l("sup",null,"[3]"),e(" Not affected by the "),l("code",null,"CACHE_ENABLED"),e(" value.")],-1),oe=l("p",null,[l("sup",null,"[4]"),e(),l("code",null,"CACHE_STORE"),e(" For larger projects, you most likely don\u2019t want to rely on local memory for caching. Instead, you can use the above "),l("code",null,"CACHE_STORE"),e(" environment variable to use either "),l("code",null,"memcache"),e(" or "),l("code",null,"redis"),e(" as the cache store. Based on the chosen "),l("code",null,"CACHE_STORE"),e(", you must also provide the following configurations:")],-1),ue=l("h3",{id:"memory-2"},[e("Memory "),l("a",{class:"header-anchor",href:"#memory-2"},"#")],-1),se=l("p",null,"No additional configuration required.",-1),ae=l("h3",{id:"redis-2"},[e("Redis "),l("a",{class:"header-anchor",href:"#redis-2"},"#")],-1),de=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CACHE_REDIS")]),l("td",null,[e("Redis connection string, eg: "),l("code",null,"redis://:authpassword@127.0.0.1:6380/4")]),l("td",null,"\u2014")])])],-1),re=l("p",null,"Alternatively, you can provide the individual connection parameters:",-1),ie=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CACHE_REDIS_HOST")]),l("td",null,"Hostname of the Redis instance"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"CACHE_REDIS_PORT")]),l("td",null,"Port of the Redis instance"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"CACHE_REDIS_PASSWORD")]),l("td",null,"Password for your Redis instance"),l("td",null,"\u2013")])])],-1),ce=l("h3",{id:"memcache-2"},[e("Memcache "),l("a",{class:"header-anchor",href:"#memcache-2"},"#")],-1),he=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CACHE_MEMCACHE")]),l("td",null,[e("Location of your memcache instance. You can use "),l("a",{href:"#environment-syntax-prefix"},[l("code",null,"array:"),e(" syntax")]),e(", eg: "),l("code",null,"array:<instance-1>,<instance-2>"),e(" for multiple memcache instances.")]),l("td",null,"\u2014")])])],-1),_e=l("h2",{id:"file-storage"},[e("File Storage "),l("a",{class:"header-anchor",href:"#file-storage"},"#")],-1),pe=l("p",null,[e("By default, Directus stores all uploaded files locally on disk. However, you can also configure Directus to use S3, Google Cloud Storage, or Azure. You can also configure "),l("em",null,"multiple"),e(" storage adapters at the same time. This allows you to choose where files are being uploaded on a file-by-file basis. In the Admin App, files will automatically be uploaded to the first configured storage location (in this case "),l("code",null,"local"),e("). The used storage location is saved under "),l("code",null,"storage"),e(" in "),l("code",null,"directus_files"),e(".")],-1),fe=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"File Storage Default"),l("p",null,"If you don\u2019t provide any configuration for storage adapters, this default will be used:"),l("pre",null,[l("code",null,`STORAGE_LOCATIONS="local"
87
87
  STORAGE_LOCAL_ROOT="./uploads"
88
- `)])],-1),me=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_LOCATIONS")]),l("td",null,[e("A CSV of storage locations (eg: "),l("code",null,"local,digitalocean,amazon"),e(") to use. You can use any names you\u2019d like for these keys.")]),l("td",null,[l("code",null,"local")])])])],-1),Ee=l("p",null,"For each of the storage locations listed, you must provide the following configuration:",-1),ge=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_DRIVER")]),l("td",null,[e("Which driver to use, either "),l("code",null,"local"),e(", "),l("code",null,"s3"),e(", "),l("code",null,"gcs"),e(", "),l("code",null,"azure")]),l("td")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ROOT")]),l("td",null,"Where to store the files on disk"),l("td",null,[l("code",null,"''")])])])],-1),Ae=l("p",null,"Based on your configured driver, you must also provide the following configurations:",-1),Te=l("h3",{id:"local-(local)"},[e("Local ("),l("code",null,"local"),e(") "),l("a",{class:"header-anchor",href:"#local-(local)"},"#")],-1),Re=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ROOT")]),l("td",null,"Where to store the files on disk"),l("td",null,"\u2013")])])],-1),be=l("h3",{id:"s3-(s3)"},[e("S3 ("),l("code",null,"s3"),e(") "),l("a",{class:"header-anchor",href:"#s3-(s3)"},"#")],-1),Oe=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_KEY")]),l("td",null,"User key"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_SECRET")]),l("td",null,"User secret"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_BUCKET")]),l("td",null,"S3 Bucket"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_REGION")]),l("td",null,"S3 Region"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ENDPOINT")]),l("td",null,"S3 Endpoint"),l("td",null,[l("code",null,"s3.amazonaws.com")])]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ACL")]),l("td",null,"S3 ACL"),l("td",null,"\u2013")])])],-1),Se=l("h3",{id:"azure-(azure)"},[e("Azure ("),l("code",null,"azure"),e(") "),l("a",{class:"header-anchor",href:"#azure-(azure)"},"#")],-1),De=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_CONTAINER_NAME")]),l("td",null,"Azure Storage container"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ACCOUNT_NAME")]),l("td",null,"Azure Storage account name"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ACCOUNT_KEY")]),l("td",null,"Azure Storage key"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ENDPOINT")]),l("td",null,"Azure URL"),l("td",null,[l("code",null,"https://{ACCOUNT_KEY}.blob.core.windows.net")])])])],-1),Ie=l("h3",{id:"google-cloud-storage-(gcs)"},[e("Google Cloud Storage ("),l("code",null,"gcs"),e(") "),l("a",{class:"header-anchor",href:"#google-cloud-storage-(gcs)"},"#")],-1),ye=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_KEY_FILENAME")]),l("td",null,"Path to key file on disk"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_BUCKET")]),l("td",null,"Google Cloud Storage bucket"),l("td",null,"\u2013")])])],-1),Ce=l("h3",{id:"example%3A-multiple-storage-adapters"},[e("Example: Multiple Storage Adapters "),l("a",{class:"header-anchor",href:"#example%3A-multiple-storage-adapters"},"#")],-1),Le=l("p",null,"Below showcases a CSV of storage location names, with a config block for each:",-1),ve=l("pre",null,[l("code",null,`STORAGE_LOCATIONS="local,aws"
88
+ `)])],-1),me=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_LOCATIONS")]),l("td",null,[e("A CSV of storage locations (eg: "),l("code",null,"local,digitalocean,amazon"),e(") to use. You can use any names you\u2019d like for these keys.")]),l("td",null,[l("code",null,"local")])])])],-1),Ee=l("p",null,"For each of the storage locations listed, you must provide the following configuration:",-1),Ae=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_DRIVER")]),l("td",null,[e("Which driver to use, either "),l("code",null,"local"),e(", "),l("code",null,"s3"),e(", "),l("code",null,"gcs"),e(", "),l("code",null,"azure")]),l("td")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ROOT")]),l("td",null,"Where to store the files on disk"),l("td",null,[l("code",null,"''")])])])],-1),ge=l("p",null,"Based on your configured driver, you must also provide the following configurations:",-1),Te=l("h3",{id:"local-(local)"},[e("Local ("),l("code",null,"local"),e(") "),l("a",{class:"header-anchor",href:"#local-(local)"},"#")],-1),Re=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ROOT")]),l("td",null,"Where to store the files on disk"),l("td",null,"\u2013")])])],-1),Oe=l("h3",{id:"s3-(s3)"},[e("S3 ("),l("code",null,"s3"),e(") "),l("a",{class:"header-anchor",href:"#s3-(s3)"},"#")],-1),be=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_KEY")]),l("td",null,"User key"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_SECRET")]),l("td",null,"User secret"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_BUCKET")]),l("td",null,"S3 Bucket"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_REGION")]),l("td",null,"S3 Region"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ENDPOINT")]),l("td",null,"S3 Endpoint"),l("td",null,[l("code",null,"s3.amazonaws.com")])]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ACL")]),l("td",null,"S3 ACL"),l("td",null,"\u2013")])])],-1),Se=l("h3",{id:"azure-(azure)"},[e("Azure ("),l("code",null,"azure"),e(") "),l("a",{class:"header-anchor",href:"#azure-(azure)"},"#")],-1),De=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_CONTAINER_NAME")]),l("td",null,"Azure Storage container"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ACCOUNT_NAME")]),l("td",null,"Azure Storage account name"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ACCOUNT_KEY")]),l("td",null,"Azure Storage key"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ENDPOINT")]),l("td",null,"Azure URL"),l("td",null,[l("code",null,"https://{ACCOUNT_KEY}.blob.core.windows.net")])])])],-1),Ie=l("h3",{id:"google-cloud-storage-(gcs)"},[e("Google Cloud Storage ("),l("code",null,"gcs"),e(") "),l("a",{class:"header-anchor",href:"#google-cloud-storage-(gcs)"},"#")],-1),ye=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_KEY_FILENAME")]),l("td",null,"Path to key file on disk"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_BUCKET")]),l("td",null,"Google Cloud Storage bucket"),l("td",null,"\u2013")])])],-1),Ce=l("h3",{id:"example%3A-multiple-storage-adapters"},[e("Example: Multiple Storage Adapters "),l("a",{class:"header-anchor",href:"#example%3A-multiple-storage-adapters"},"#")],-1),Le=l("p",null,"Below showcases a CSV of storage location names, with a config block for each:",-1),ve=l("pre",null,[l("code",null,`STORAGE_LOCATIONS="local,aws"
89
89
 
90
90
  STORAGE_LOCAL_DRIVER="local"
91
91
  STORAGE_LOCAL_ROOT="local"
@@ -94,7 +94,7 @@ STORAGE_AWS_KEY="tp15c...510vk"
94
94
  STORAGE_AWS_SECRET="yk29b...b932n"
95
95
  STORAGE_AWS_REGION="us-east-2"
96
96
  STORAGE_AWS_BUCKET="my-files"
97
- `)],-1),we=l("h2",{id:"assets"},[e("Assets "),l("a",{class:"header-anchor",href:"#assets"},"#")],-1),Ue=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"ASSETS_CACHE_TTL")]),l("td",null,[e("How long assets will be cached for in the browser. Sets the "),l("code",null,"max-age"),e(" value of the "),l("code",null,"Cache-Control"),e(" header.")]),l("td",null,[l("code",null,"30m")])]),l("tr",null,[l("td",null,[l("code",null,"ASSETS_TRANSFORM_MAX_CONCURRENT")]),l("td",null,"How many file transformations can be done simultaneously"),l("td",null,[l("code",null,"4")])]),l("tr",null,[l("td",null,[l("code",null,"ASSETS_TRANSFORM_IMAGE_MAX_DIMENSION")]),l("td",null,"The max pixel dimensions size (width/height) that is allowed to be transformed"),l("td",null,[l("code",null,"6000")])]),l("tr",null,[l("td",null,[l("code",null,"ASSETS_TRANSFORM_MAX_OPERATIONS")]),l("td",null,"The max number of transform operations that is allowed to be processed (excludes saved presets)"),l("td",null,[l("code",null,"5")])])])],-1),He=l("p",null,"Image transformations can be fairly heavy on memory usage. If you\u2019re using a system with 1GB or less available memory, we recommend lowering the allowed concurrent transformations to prevent you from overflowing your server.",-1),Ne=l("h2",{id:"authentication"},[e("Authentication "),l("a",{class:"header-anchor",href:"#authentication"},"#")],-1),Pe=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"AUTH_PROVIDERS")]),l("td",null,"CSV of auth providers you want to use."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_DISABLE_DEFAULT")]),l("td",null,"Disable the default auth provider"),l("td",null,[l("code",null,"false")])])])],-1),Ve=l("p",null,"For each of the auth providers you list, you must provide the following configuration:",-1),Me=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_DRIVER")]),l("td",null,[e("Which driver to use, either "),l("code",null,"local"),e(", "),l("code",null,"oauth2"),e(", "),l("code",null,"openid"),e(", "),l("code",null,"ldap")]),l("td",null,"\u2013")])])],-1),xe=l("p",null,"You must also provide a number of extra variables. These differ per auth driver service. The following is a list of common required configuration options:",-1),Be=l("h3",{id:"local-(local)-2"},[e("Local ("),l("code",null,"local"),e(") "),l("a",{class:"header-anchor",href:"#local-(local)-2"},"#")],-1),je=l("p",null,"No additional configuration required.",-1),Ge=l("h3",{id:"sso-(oauth2-and-openid)"},[e("SSO ("),l("code",null,"oauth2"),e(" and "),l("code",null,"openid"),e(") "),l("a",{class:"header-anchor",href:"#sso-(oauth2-and-openid)"},"#")],-1),ke=l("p",null,"Directus\u2019 SSO integrations provide powerful alternative ways to authenticate into your project. Directus will ask you to login on the external service, and return authenticated with a Directus account linked to that service.",-1),We=l("p",null,[e("For example, you can login to Directus using a github account by creating an "),l("a",{href:"https://github.com/settings/developers",target:"_blank",rel:"noopener noreferrer"},"OAuth 2.0 app in GitHub"),e(" and adding the following configuration to Directus:")],-1),qe=l("pre",null,[l("code",null,`AUTH_PROVIDERS="github"
97
+ `)],-1),Ue=l("h2",{id:"assets"},[e("Assets "),l("a",{class:"header-anchor",href:"#assets"},"#")],-1),we=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"ASSETS_CACHE_TTL")]),l("td",null,[e("How long assets will be cached for in the browser. Sets the "),l("code",null,"max-age"),e(" value of the "),l("code",null,"Cache-Control"),e(" header.")]),l("td",null,[l("code",null,"30m")])]),l("tr",null,[l("td",null,[l("code",null,"ASSETS_TRANSFORM_MAX_CONCURRENT")]),l("td",null,"How many file transformations can be done simultaneously"),l("td",null,[l("code",null,"4")])]),l("tr",null,[l("td",null,[l("code",null,"ASSETS_TRANSFORM_IMAGE_MAX_DIMENSION")]),l("td",null,"The max pixel dimensions size (width/height) that is allowed to be transformed"),l("td",null,[l("code",null,"6000")])]),l("tr",null,[l("td",null,[l("code",null,"ASSETS_TRANSFORM_MAX_OPERATIONS")]),l("td",null,"The max number of transform operations that is allowed to be processed (excludes saved presets)"),l("td",null,[l("code",null,"5")])])])],-1),He=l("p",null,"Image transformations can be fairly heavy on memory usage. If you\u2019re using a system with 1GB or less available memory, we recommend lowering the allowed concurrent transformations to prevent you from overflowing your server.",-1),Ne=l("h2",{id:"authentication"},[e("Authentication "),l("a",{class:"header-anchor",href:"#authentication"},"#")],-1),Pe=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"AUTH_PROVIDERS")]),l("td",null,"CSV of auth providers you want to use."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_DISABLE_DEFAULT")]),l("td",null,"Disable the default auth provider"),l("td",null,[l("code",null,"false")])])])],-1),Ve=l("p",null,"For each of the auth providers you list, you must provide the following configuration:",-1),Me=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_DRIVER")]),l("td",null,[e("Which driver to use, either "),l("code",null,"local"),e(", "),l("code",null,"oauth2"),e(", "),l("code",null,"openid"),e(", "),l("code",null,"ldap")]),l("td",null,"\u2013")])])],-1),xe=l("p",null,"You must also provide a number of extra variables. These differ per auth driver service. The following is a list of common required configuration options:",-1),Be=l("h3",{id:"local-(local)-2"},[e("Local ("),l("code",null,"local"),e(") "),l("a",{class:"header-anchor",href:"#local-(local)-2"},"#")],-1),je=l("p",null,"No additional configuration required.",-1),Ge=l("h3",{id:"sso-(oauth2-and-openid)"},[e("SSO ("),l("code",null,"oauth2"),e(" and "),l("code",null,"openid"),e(") "),l("a",{class:"header-anchor",href:"#sso-(oauth2-and-openid)"},"#")],-1),ke=l("p",null,"Directus\u2019 SSO integrations provide powerful alternative ways to authenticate into your project. Directus will ask you to login on the external service, and return authenticated with a Directus account linked to that service.",-1),We=l("p",null,[e("For example, you can login to Directus using a github account by creating an "),l("a",{href:"https://github.com/settings/developers",target:"_blank",rel:"noopener noreferrer"},"OAuth 2.0 app in GitHub"),e(" and adding the following configuration to Directus:")],-1),qe=l("pre",null,[l("code",null,`AUTH_PROVIDERS="github"
98
98
 
99
99
  AUTH_GITHUB_DRIVER="oauth2"
100
100
  AUTH_GITHUB_CLIENT_ID="99d3...c3c4"
@@ -102,7 +102,7 @@ AUTH_GITHUB_CLIENT_SECRET="34ae...f963"
102
102
  AUTH_GITHUB_AUTHORIZE_URL="https://github.com/login/oauth/authorize"
103
103
  AUTH_GITHUB_ACCESS_URL="https://github.com/login/oauth/access_token"
104
104
  AUTH_GITHUB_PROFILE_URL="https://api.github.com/user"
105
- `)],-1),Fe=l("div",{class:"warning hint"},[l("div",{class:"hint-title"},"PUBLIC_URL"),l("p",null,[e("These flows rely on the "),l("code",null,"PUBLIC_URL"),e(" variable for redirecting. Make sure that variable is configured correctly.")])],-1),Ye=l("h4",{id:"oauth-2.0"},[e("OAuth 2.0 "),l("a",{class:"header-anchor",href:"#oauth-2.0"},"#")],-1),Ke=l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])],-1),ze=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_ID")]),l("td",null,"OAuth identifier for the external service."),l("td",null,"\u2013")],-1),Xe=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_SECRET")]),l("td",null,"OAuth secret for the external service."),l("td",null,"\u2013")],-1),Je=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_SCOPE")]),l("td",null,"A white-space separated list of privileges Directus will request."),l("td",null,[l("code",null,"email")])],-1),Ze=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_AUTHORIZE_URL")]),l("td",null,"The authorize page URL of the external service."),l("td",null,"\u2013")],-1),$e=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ACCESS_URL")]),l("td",null,"The token access URL of the external service."),l("td",null,"\u2013")],-1),Qe=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_PROFILE_URL")]),l("td",null,"The user profile information URL of the external service."),l("td",null,"\u2013")],-1),ln=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_EMAIL_KEY")]),l("td",null,"OAuth profile email key used to find the email address."),l("td",null,[l("code",null,"email")])],-1),en=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_IDENTIFIER_KEY")]),l("td",null,[e("OAuth profile identifier key used to verify the user. Will default to "),l("code",null,"EMAIL_KEY"),e(".")]),l("td",null,"\u2013")],-1),nn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ALLOW_PUBLIC_REGISTRATION")]),l("td",null,"Automatically create accounts for authenticating users."),l("td",null,[l("code",null,"false")])],-1),tn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_DEFAULT_ROLE_ID")]),l("td",null,"The Directus role ID assigned to created users."),l("td",null,"\u2013")],-1),on=l("td",null,[l("code",null,"AUTH_<PROVIDER>_ICON")],-1),un=e("SVG icon to display with the login link. You can choose from "),sn=e("Social icon or Material icon set"),an=e("."),dn=l("td",null,[l("code",null,"account_circle")],-1),rn=l("h4",{id:"openid"},[e("OpenID "),l("a",{class:"header-anchor",href:"#openid"},"#")],-1),cn=l("p",null,"OpenID is an authentication protocol built on OAuth 2.0, and should be preferred over standard OAuth 2.0 where possible. OpenID offers better user verification and consistent profile information, allowing for more complete user registrations.",-1),hn=l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])],-1),_n=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_ID")]),l("td",null,"OpenID identifier for the external service."),l("td",null,"\u2013")],-1),pn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_SECRET")]),l("td",null,"OpenID secret for the external service."),l("td",null,"\u2013")],-1),fn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_SCOPE")]),l("td",null,"A white-space separated list of privileges Directus will request."),l("td",null,[l("code",null,"openid profile email")])],-1),mn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ISSUER_URL")]),l("td",null,[e("The OpenID "),l("code",null,".well-known"),e(" Discovery Document URL.")]),l("td",null,"\u2013")],-1),En=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_IDENTIFIER_KEY")]),l("td",null,"OpenID profile identifier key used to verify the user."),l("td",null,[l("code",null,"sub")])],-1),gn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ALLOW_PUBLIC_REGISTRATION")]),l("td",null,"Automatically create accounts for authenticating users."),l("td",null,[l("code",null,"false")])],-1),An=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_REQUIRE_VERIFIED_EMAIL")]),l("td",null,"Require users to have a verified email address."),l("td",null,[l("code",null,"false")])],-1),Tn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_DEFAULT_ROLE_ID")]),l("td",null,"The Directus role ID assigned to created users."),l("td",null,"\u2013")],-1),Rn=l("td",null,[l("code",null,"AUTH_<PROVIDER>_ICON")],-1),bn=e("SVG icon to display with the login link. You can choose from "),On=e("Social icon or Material icon set"),Sn=e("."),Dn=l("td",null,[l("code",null,"account_circle")],-1),In=l("h3",{id:"ldap-(ldap)"},[e("LDAP ("),l("code",null,"ldap"),e(") "),l("a",{class:"header-anchor",href:"#ldap-(ldap)"},"#")],-1),yn=l("p",null,"LDAP allows Active Directory users to authenticate and use Directus without having to be manually configured. User information and roles will be assigned from Active Directory.",-1),Cn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_URL")]),l("td",null,"LDAP connection URL."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_BIND_DN")]),l("td",null,[e("Bind user "),l("sup",null,"[1]"),e(" distinguished name.")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_BIND_PASSWORD")]),l("td",null,"Bind user password."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_USER_DN")]),l("td",null,"Directory path containing users."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_USER_ATTRIBUTE")]),l("td",null,"Attribute to identify users by."),l("td",null,[l("code",null,"cn")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_USER_SCOPE")]),l("td",null,[e("Scope of the user search, either "),l("code",null,"base"),e(", "),l("code",null,"one"),e(", "),l("code",null,"sub"),e(),l("sup",null,"[2]"),e(".")]),l("td",null,[l("code",null,"one")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_GROUP_DN")]),l("td",null,"Directory path containing groups."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_GROUP_ATTRIBUTE")]),l("td",null,"Attribute to identify user as a member of a group."),l("td",null,[l("code",null,"member")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_GROUP_SCOPE")]),l("td",null,[e("Scope of the group search, either "),l("code",null,"base"),e(", "),l("code",null,"one"),e(", "),l("code",null,"sub"),e(),l("sup",null,"[2]"),e(".")]),l("td",null,[l("code",null,"one")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_MAIL_ATTRIBUTE")]),l("td",null,"Attribute containing the email of the user."),l("td",null,[l("code",null,"mail")])])])],-1),Ln=l("p",null,[l("sup",null,"[1]"),e(" The bind user must have permission to query users and groups to perform authentication.")],-1),vn=l("p",null,[l("sup",null,"[2]"),e(" The scope defines the following behaviors:")],-1),wn=l("ul",null,[l("li",null,[l("code",null,"base"),e(": Limits the scope to a single object defined by the associated DN.")]),l("li",null,[l("code",null,"one"),e(": Searches all objects within the associated DN.")]),l("li",null,[l("code",null,"sub"),e(": Searches all objects and sub-objects within the associated DN.")])],-1),Un=l("h3",{id:"example%3A-ldap"},[e("Example: LDAP "),l("a",{class:"header-anchor",href:"#example%3A-ldap"},"#")],-1),Hn=l("pre",null,[l("code",null,`AUTH_PROVIDERS="ldap"
105
+ `)],-1),Fe=l("div",{class:"warning hint"},[l("div",{class:"hint-title"},"PUBLIC_URL"),l("p",null,[e("These flows rely on the "),l("code",null,"PUBLIC_URL"),e(" variable for redirecting. Make sure that variable is configured correctly.")])],-1),Ye=l("h4",{id:"oauth-2.0"},[e("OAuth 2.0 "),l("a",{class:"header-anchor",href:"#oauth-2.0"},"#")],-1),Ke=l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])],-1),ze=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_ID")]),l("td",null,"OAuth identifier for the external service."),l("td",null,"\u2013")],-1),Xe=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_SECRET")]),l("td",null,"OAuth secret for the external service."),l("td",null,"\u2013")],-1),Je=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_SCOPE")]),l("td",null,"A white-space separated list of privileges Directus will request."),l("td",null,[l("code",null,"email")])],-1),Ze=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_AUTHORIZE_URL")]),l("td",null,"The authorize page URL of the external service."),l("td",null,"\u2013")],-1),$e=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ACCESS_URL")]),l("td",null,"The token access URL of the external service."),l("td",null,"\u2013")],-1),Qe=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_PROFILE_URL")]),l("td",null,"The user profile information URL of the external service."),l("td",null,"\u2013")],-1),ln=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_EMAIL_KEY")]),l("td",null,"OAuth profile email key used to find the email address."),l("td",null,[l("code",null,"email")])],-1),en=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_IDENTIFIER_KEY")]),l("td",null,[e("OAuth profile identifier key used to verify the user. Will default to "),l("code",null,"EMAIL_KEY"),e(".")]),l("td",null,"\u2013")],-1),nn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ALLOW_PUBLIC_REGISTRATION")]),l("td",null,"Automatically create accounts for authenticating users."),l("td",null,[l("code",null,"false")])],-1),tn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_DEFAULT_ROLE_ID")]),l("td",null,"The Directus role ID assigned to created users."),l("td",null,"\u2013")],-1),on=l("td",null,[l("code",null,"AUTH_<PROVIDER>_ICON")],-1),un=e("SVG icon to display with the login link. You can choose from "),sn=e("Social icon or Material icon set"),an=e("."),dn=l("td",null,[l("code",null,"account_circle")],-1),rn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_PARAMS")]),l("td",null,"Custom parameters to send to the auth provider"),l("td",null,"\u2013")],-1),cn=l("h4",{id:"openid"},[e("OpenID "),l("a",{class:"header-anchor",href:"#openid"},"#")],-1),hn=l("p",null,"OpenID is an authentication protocol built on OAuth 2.0, and should be preferred over standard OAuth 2.0 where possible. OpenID offers better user verification and consistent profile information, allowing for more complete user registrations.",-1),_n=l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])],-1),pn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_ID")]),l("td",null,"OpenID identifier for the external service."),l("td",null,"\u2013")],-1),fn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_SECRET")]),l("td",null,"OpenID secret for the external service."),l("td",null,"\u2013")],-1),mn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_SCOPE")]),l("td",null,"A white-space separated list of privileges Directus will request."),l("td",null,[l("code",null,"openid profile email")])],-1),En=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ISSUER_URL")]),l("td",null,[e("The OpenID "),l("code",null,".well-known"),e(" Discovery Document URL.")]),l("td",null,"\u2013")],-1),An=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_IDENTIFIER_KEY")]),l("td",null,"OpenID profile identifier key used to verify the user."),l("td",null,[l("code",null,"sub")])],-1),gn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ALLOW_PUBLIC_REGISTRATION")]),l("td",null,"Automatically create accounts for authenticating users."),l("td",null,[l("code",null,"false")])],-1),Tn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_REQUIRE_VERIFIED_EMAIL")]),l("td",null,"Require users to have a verified email address."),l("td",null,[l("code",null,"false")])],-1),Rn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_DEFAULT_ROLE_ID")]),l("td",null,"The Directus role ID assigned to created users."),l("td",null,"\u2013")],-1),On=l("td",null,[l("code",null,"AUTH_<PROVIDER>_ICON")],-1),bn=e("SVG icon to display with the login link. You can choose from "),Sn=e("Social icon or Material icon set"),Dn=e("."),In=l("td",null,[l("code",null,"account_circle")],-1),yn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_PARAMS")]),l("td",null,"Custom parameters to send to the auth provider"),l("td",null,"\u2013")],-1),Cn=l("h3",{id:"ldap-(ldap)"},[e("LDAP ("),l("code",null,"ldap"),e(") "),l("a",{class:"header-anchor",href:"#ldap-(ldap)"},"#")],-1),Ln=l("p",null,"LDAP allows Active Directory users to authenticate and use Directus without having to be manually configured. User information and roles will be assigned from Active Directory.",-1),vn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_URL")]),l("td",null,"LDAP connection URL."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_BIND_DN")]),l("td",null,[e("Bind user "),l("sup",null,"[1]"),e(" distinguished name.")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_BIND_PASSWORD")]),l("td",null,"Bind user password."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_USER_DN")]),l("td",null,"Directory path containing users."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_USER_ATTRIBUTE")]),l("td",null,"Attribute to identify users by."),l("td",null,[l("code",null,"cn")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_USER_SCOPE")]),l("td",null,[e("Scope of the user search, either "),l("code",null,"base"),e(", "),l("code",null,"one"),e(", "),l("code",null,"sub"),e(),l("sup",null,"[2]"),e(".")]),l("td",null,[l("code",null,"one")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_GROUP_DN")]),l("td",null,"Directory path containing groups."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_GROUP_ATTRIBUTE")]),l("td",null,"Attribute to identify user as a member of a group."),l("td",null,[l("code",null,"member")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_GROUP_SCOPE")]),l("td",null,[e("Scope of the group search, either "),l("code",null,"base"),e(", "),l("code",null,"one"),e(", "),l("code",null,"sub"),e(),l("sup",null,"[2]"),e(".")]),l("td",null,[l("code",null,"one")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_MAIL_ATTRIBUTE")]),l("td",null,"Attribute containing the email of the user."),l("td",null,[l("code",null,"mail")])])])],-1),Un=l("p",null,[l("sup",null,"[1]"),e(" The bind user must have permission to query users and groups to perform authentication.")],-1),wn=l("p",null,[l("sup",null,"[2]"),e(" The scope defines the following behaviors:")],-1),Hn=l("ul",null,[l("li",null,[l("code",null,"base"),e(": Limits the scope to a single object defined by the associated DN.")]),l("li",null,[l("code",null,"one"),e(": Searches all objects within the associated DN.")]),l("li",null,[l("code",null,"sub"),e(": Searches all objects and sub-objects within the associated DN.")])],-1),Nn=l("h3",{id:"example%3A-ldap"},[e("Example: LDAP "),l("a",{class:"header-anchor",href:"#example%3A-ldap"},"#")],-1),Pn=l("pre",null,[l("code",null,`AUTH_PROVIDERS="ldap"
106
106
 
107
107
  AUTH_LDAP_DRIVER="ldap"
108
108
  AUTH_LDAP_CLIENT_URL="ldap://ldap.directus.io"
@@ -110,7 +110,7 @@ AUTH_LDAP_BIND_DN="CN=Bind User,OU=Users,DC=ldap,DC=directus,DC=io"
110
110
  AUTH_LDAP_BIND_PASSWORD="p455w0rd"
111
111
  AUTH_LDAP_USER_DN="OU=Users,DC=ldap,DC=directus,DC=io"
112
112
  AUTH_LDAP_GROUP_DN="OU=Groups,DC=ldap,DC=directus,DC=io"
113
- `)],-1),Nn=l("h3",{id:"example%3A-multiple-auth-providers"},[e("Example: Multiple Auth Providers "),l("a",{class:"header-anchor",href:"#example%3A-multiple-auth-providers"},"#")],-1),Pn=l("p",null,"You can configure multiple providers for handling authentication in Directus. This allows for different options when logging in. To do this, you can provide a CSV of provider names, and provide a config block for each of them:",-1),Vn=l("pre",null,[l("code",null,`AUTH_PROVIDERS="google,adobe"
113
+ `)],-1),Vn=l("h3",{id:"example%3A-multiple-auth-providers"},[e("Example: Multiple Auth Providers "),l("a",{class:"header-anchor",href:"#example%3A-multiple-auth-providers"},"#")],-1),Mn=l("p",null,"You can configure multiple providers for handling authentication in Directus. This allows for different options when logging in. To do this, you can provide a CSV of provider names, and provide a config block for each of them:",-1),xn=l("pre",null,[l("code",null,`AUTH_PROVIDERS="google,adobe"
114
114
 
115
115
  AUTH_GOOGLE_DRIVER="openid"
116
116
  AUTH_GOOGLE_CLIENT_ID="<google_application_id>"
@@ -126,4 +126,4 @@ AUTH_ADOBE_AUTHORIZE_URL="https://ims-na1.adobelogin.com/ims/authorize/v2"
126
126
  AUTH_ADOBE_ACCESS_URL="https://ims-na1.adobelogin.com/ims/token/v3"
127
127
  AUTH_ADOBE_PROFILE_URL="https://ims-na1.adobelogin.com/ims/userinfo/v2"
128
128
  AUTH_ADOBE_ICON="adobe"
129
- `)],-1),Mn=l("h2",{id:"extensions"},[e("Extensions "),l("a",{class:"header-anchor",href:"#extensions"},"#")],-1),xn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EXTENSIONS_PATH")]),l("td",null,"Path to your local extensions folder."),l("td",null,[l("code",null,"./extensions")])])])],-1),Bn=l("h2",{id:"email"},[e("Email "),l("a",{class:"header-anchor",href:"#email"},"#")],-1),jn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_FROM")]),l("td",null,"Email address from which emails are sent."),l("td",null,[l("code",null,"no-reply@directus.io")])]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_TRANSPORT")]),l("td",null,[e("What to use to send emails. One of "),l("code",null,"sendmail"),e(", "),l("code",null,"smtp"),e(", "),l("code",null,"mailgun"),e(", "),l("code",null,"ses"),e(".")]),l("td",null,[l("code",null,"sendmail")])])])],-1),Gn=l("p",null,[e("Based on the "),l("code",null,"EMAIL_TRANSPORT"),e(" used, you must also provide the following configurations:")],-1),kn=l("h3",{id:"sendmail-(sendmail)"},[e("Sendmail ("),l("code",null,"sendmail"),e(") "),l("a",{class:"header-anchor",href:"#sendmail-(sendmail)"},"#")],-1),Wn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_SENDMAIL_NEW_LINE")]),l("td",null,"What new line style to use in sendmail."),l("td",null,[l("code",null,"unix")])]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SENDMAIL_PATH")]),l("td",null,"Path to your sendmail executable."),l("td",null,[l("code",null,"/usr/sbin/sendmail")])])])],-1),qn=l("h3",{id:"smtp-(smtp)"},[e("SMTP ("),l("code",null,"smtp"),e(") "),l("a",{class:"header-anchor",href:"#smtp-(smtp)"},"#")],-1),Fn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_HOST")]),l("td",null,"SMTP Host"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_PORT")]),l("td",null,"SMTP Port"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_USER")]),l("td",null,"SMTP User"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_PASSWORD")]),l("td",null,"SMTP Password"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_POOL")]),l("td",null,"Use SMTP pooling"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_SECURE")]),l("td",null,"Enable TLS"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_IGNORE_TLS")]),l("td",null,"Ignore TLS"),l("td",null,"\u2013")])])],-1),Yn=l("h3",{id:"mailgun-(mailgun)"},[e("Mailgun ("),l("code",null,"mailgun"),e(") "),l("a",{class:"header-anchor",href:"#mailgun-(mailgun)"},"#")],-1),Kn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_MAILGUN_API_KEY")]),l("td",null,"Your Mailgun API key."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_MAILGUN_DOMAIN")]),l("td",null,[e("A domain from "),l("a",{href:"https://app.mailgun.com/app/sending/domains",target:"_blank",rel:"noopener noreferrer"},"your Mailgun account")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_MAILGUN_HOST")]),l("td",null,"Allows you to specify a custom host."),l("td",null,[l("code",null,"api.mailgun.net")])])])],-1),zn=l("h3",{id:"aws-ses-(ses)"},[e("AWS SES ("),l("code",null,"ses"),e(") "),l("a",{class:"header-anchor",href:"#aws-ses-(ses)"},"#")],-1),Xn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_SES_CREDENTIALS__ACCESS_KEY_ID")]),l("td",null,"Your AWS SES access key. ID."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SES_CREDENTIALS__SECRET_ACCESS_KEY")]),l("td",null,"Your AWS SES secret key."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SES_REGION")]),l("td",null,"Your AWS SES region."),l("td",null,"\u2013")])])],-1),Jn=l("h2",{id:"admin-account"},[e("Admin Account "),l("a",{class:"header-anchor",href:"#admin-account"},"#")],-1),Zn=l("p",null,[e("If you\u2019re relying on Docker and/or the "),l("code",null,"directus bootstrap"),e(" CLI command, you can pass the following two environment variables to automatically configure the first user:")],-1),$n=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"ADMIN_EMAIL")]),l("td",null,[e("The email address of the first user that\u2019s automatically created when using "),l("code",null,"directus bootstrap"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"ADMIN_PASSWORD")]),l("td",null,[e("The password of the first user that\u2019s automatically created when using "),l("code",null,"directus bootstrap"),e(".")]),l("td",null,"\u2013")])])],-1),Qn=l("h2",{id:"telemetry"},[e("Telemetry "),l("a",{class:"header-anchor",href:"#telemetry"},"#")],-1),lt=l("p",null,"To more accurately gauge the frequency of installation, version fragmentation, and general size of the userbase, Directus collects little and anonymized data about your environment. You can easily opt-out with the following environment variable:",-1),et=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"TELEMETRY")]),l("td",null,"Allow Directus to collect anonymized data about your environment."),l("td",null,[l("code",null,"true")])])])],-1),st={setup(nt,{expose:a}){const u={title:"Configuration Options",modularExtension:!1};return a({frontmatter:u}),(tt,ot)=>{const t=s("router-link"),d=s("DocsWrapper");return r(),i(d,{frontmatter:u},{default:n(()=>[l("div",c,[h,_,p,f,m,E,g,A,T,R,b,O,S,D,I,y,C,L,v,w,U,H,N,P,V,M,x,B,j,G,k,W,q,F,Y,K,z,X,J,Z,$,Q,ll,l("table",null,[el,l("tbody",null,[nl,tl,ol,ul,sl,al,dl,rl,l("tr",null,[il,l("td",null,[cl,o(t,{to:"/docs/reference/authentication/#request-password-reset"},{default:n(()=>[hl,_l,pl]),_:1})]),fl]),l("tr",null,[ml,l("td",null,[El,o(t,{to:"/docs/reference/system/users/#invite-a-new-user"},{default:n(()=>[gl,Al,Tl]),_:1})]),Rl])])]),bl,Ol,Sl,l("p",null,[Dl,Il,yl,o(t,{to:"/docs/reference/system/utilities/#generate-a-hash"},{default:n(()=>[Cl]),_:1}),Ll]),vl,wl,Ul,Hl,Nl,Pl,Vl,Ml,xl,Bl,jl,Gl,kl,Wl,ql,Fl,Yl,Kl,zl,Xl,Jl,Zl,$l,Ql,le,ee,ne,te,oe,ue,se,ae,de,re,ie,ce,he,_e,pe,fe,me,Ee,ge,Ae,Te,Re,be,Oe,Se,De,Ie,ye,Ce,Le,ve,we,Ue,He,Ne,Pe,Ve,Me,xe,Be,je,Ge,ke,We,qe,Fe,Ye,l("table",null,[Ke,l("tbody",null,[ze,Xe,Je,Ze,$e,Qe,ln,en,nn,tn,l("tr",null,[on,l("td",null,[un,o(t,{to:"/docs/getting-started/glossary/#icons"},{default:n(()=>[sn]),_:1}),an]),dn])])]),rn,cn,l("table",null,[hn,l("tbody",null,[_n,pn,fn,mn,En,gn,An,Tn,l("tr",null,[Rn,l("td",null,[bn,o(t,{to:"/docs/getting-started/glossary/#icons"},{default:n(()=>[On]),_:1}),Sn]),Dn])])]),In,yn,Cn,Ln,vn,wn,Un,Hn,Nn,Pn,Vn,Mn,xn,Bn,jn,Gn,kn,Wn,qn,Fn,Yn,Kn,zn,Xn,Jn,Zn,$n,Qn,lt,et])]),_:1})}}};export{st as default};
129
+ `)],-1),Bn=l("h2",{id:"extensions"},[e("Extensions "),l("a",{class:"header-anchor",href:"#extensions"},"#")],-1),jn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EXTENSIONS_PATH")]),l("td",null,"Path to your local extensions folder."),l("td",null,[l("code",null,"./extensions")])])])],-1),Gn=l("h2",{id:"email"},[e("Email "),l("a",{class:"header-anchor",href:"#email"},"#")],-1),kn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_FROM")]),l("td",null,"Email address from which emails are sent."),l("td",null,[l("code",null,"no-reply@directus.io")])]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_TRANSPORT")]),l("td",null,[e("What to use to send emails. One of "),l("code",null,"sendmail"),e(", "),l("code",null,"smtp"),e(", "),l("code",null,"mailgun"),e(", "),l("code",null,"ses"),e(".")]),l("td",null,[l("code",null,"sendmail")])])])],-1),Wn=l("p",null,[e("Based on the "),l("code",null,"EMAIL_TRANSPORT"),e(" used, you must also provide the following configurations:")],-1),qn=l("h3",{id:"sendmail-(sendmail)"},[e("Sendmail ("),l("code",null,"sendmail"),e(") "),l("a",{class:"header-anchor",href:"#sendmail-(sendmail)"},"#")],-1),Fn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_SENDMAIL_NEW_LINE")]),l("td",null,"What new line style to use in sendmail."),l("td",null,[l("code",null,"unix")])]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SENDMAIL_PATH")]),l("td",null,"Path to your sendmail executable."),l("td",null,[l("code",null,"/usr/sbin/sendmail")])])])],-1),Yn=l("h3",{id:"smtp-(smtp)"},[e("SMTP ("),l("code",null,"smtp"),e(") "),l("a",{class:"header-anchor",href:"#smtp-(smtp)"},"#")],-1),Kn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_HOST")]),l("td",null,"SMTP Host"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_PORT")]),l("td",null,"SMTP Port"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_USER")]),l("td",null,"SMTP User"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_PASSWORD")]),l("td",null,"SMTP Password"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_POOL")]),l("td",null,"Use SMTP pooling"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_SECURE")]),l("td",null,"Enable TLS"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_IGNORE_TLS")]),l("td",null,"Ignore TLS"),l("td",null,"\u2013")])])],-1),zn=l("h3",{id:"mailgun-(mailgun)"},[e("Mailgun ("),l("code",null,"mailgun"),e(") "),l("a",{class:"header-anchor",href:"#mailgun-(mailgun)"},"#")],-1),Xn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_MAILGUN_API_KEY")]),l("td",null,"Your Mailgun API key."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_MAILGUN_DOMAIN")]),l("td",null,[e("A domain from "),l("a",{href:"https://app.mailgun.com/app/sending/domains",target:"_blank",rel:"noopener noreferrer"},"your Mailgun account")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_MAILGUN_HOST")]),l("td",null,"Allows you to specify a custom host."),l("td",null,[l("code",null,"api.mailgun.net")])])])],-1),Jn=l("h3",{id:"aws-ses-(ses)"},[e("AWS SES ("),l("code",null,"ses"),e(") "),l("a",{class:"header-anchor",href:"#aws-ses-(ses)"},"#")],-1),Zn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_SES_CREDENTIALS__ACCESS_KEY_ID")]),l("td",null,"Your AWS SES access key. ID."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SES_CREDENTIALS__SECRET_ACCESS_KEY")]),l("td",null,"Your AWS SES secret key."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SES_REGION")]),l("td",null,"Your AWS SES region."),l("td",null,"\u2013")])])],-1),$n=l("h2",{id:"admin-account"},[e("Admin Account "),l("a",{class:"header-anchor",href:"#admin-account"},"#")],-1),Qn=l("p",null,[e("If you\u2019re relying on Docker and/or the "),l("code",null,"directus bootstrap"),e(" CLI command, you can pass the following two environment variables to automatically configure the first user:")],-1),lt=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"ADMIN_EMAIL")]),l("td",null,[e("The email address of the first user that\u2019s automatically created when using "),l("code",null,"directus bootstrap"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"ADMIN_PASSWORD")]),l("td",null,[e("The password of the first user that\u2019s automatically created when using "),l("code",null,"directus bootstrap"),e(".")]),l("td",null,"\u2013")])])],-1),et=l("h2",{id:"telemetry"},[e("Telemetry "),l("a",{class:"header-anchor",href:"#telemetry"},"#")],-1),nt=l("p",null,"To more accurately gauge the frequency of installation, version fragmentation, and general size of the userbase, Directus collects little and anonymized data about your environment. You can easily opt-out with the following environment variable:",-1),tt=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"TELEMETRY")]),l("td",null,"Allow Directus to collect anonymized data about your environment."),l("td",null,[l("code",null,"true")])])])],-1),dt={setup(ot,{expose:a}){const u={title:"Configuration Options",modularExtension:!1};return a({frontmatter:u}),(ut,st)=>{const t=s("router-link"),d=s("DocsWrapper");return r(),i(d,{frontmatter:u},{default:n(()=>[l("div",c,[h,_,p,f,m,E,A,g,T,R,O,b,S,D,I,y,C,L,v,U,w,H,N,P,V,M,x,B,j,G,k,W,q,F,Y,K,z,X,J,Z,$,Q,ll,l("table",null,[el,l("tbody",null,[nl,tl,ol,ul,sl,al,dl,rl,l("tr",null,[il,l("td",null,[cl,o(t,{to:"/docs/reference/authentication/#request-password-reset"},{default:n(()=>[hl,_l,pl]),_:1})]),fl]),l("tr",null,[ml,l("td",null,[El,o(t,{to:"/docs/reference/system/users/#invite-a-new-user"},{default:n(()=>[Al,gl,Tl]),_:1})]),Rl])])]),Ol,bl,Sl,l("p",null,[Dl,Il,yl,o(t,{to:"/docs/reference/system/utilities/#generate-a-hash"},{default:n(()=>[Cl]),_:1}),Ll]),vl,Ul,wl,Hl,Nl,Pl,Vl,Ml,xl,Bl,jl,Gl,kl,Wl,ql,Fl,Yl,Kl,zl,Xl,Jl,Zl,$l,Ql,le,ee,ne,te,oe,ue,se,ae,de,re,ie,ce,he,_e,pe,fe,me,Ee,Ae,ge,Te,Re,Oe,be,Se,De,Ie,ye,Ce,Le,ve,Ue,we,He,Ne,Pe,Ve,Me,xe,Be,je,Ge,ke,We,qe,Fe,Ye,l("table",null,[Ke,l("tbody",null,[ze,Xe,Je,Ze,$e,Qe,ln,en,nn,tn,l("tr",null,[on,l("td",null,[un,o(t,{to:"/docs/getting-started/glossary/#icons"},{default:n(()=>[sn]),_:1}),an]),dn]),rn])]),cn,hn,l("table",null,[_n,l("tbody",null,[pn,fn,mn,En,An,gn,Tn,Rn,l("tr",null,[On,l("td",null,[bn,o(t,{to:"/docs/getting-started/glossary/#icons"},{default:n(()=>[Sn]),_:1}),Dn]),In]),yn])]),Cn,Ln,vn,Un,wn,Hn,Nn,Pn,Vn,Mn,xn,Bn,jn,Gn,kn,Wn,qn,Fn,Yn,Kn,zn,Xn,Jn,Zn,$n,Qn,lt,et,nt,tt])]),_:1})}}};export{dt as default};
@@ -8,4 +8,4 @@ import{r as l,p as c,q as u,w as t,B as e,t as s,P as n}from"./vendor.764dd834.j
8
8
  `)])],-1),E=e("p",null,[n("If you prefer to scaffold your extension manually, you can use the "),e("code",null,"directus-extension"),n(" CLI binary directly. The "),e("code",null,"--help"),n(" flag provides useful information regarding the available options and flags.")],-1),L=e("p",null,"Internally, the CLI uses Rollup to bundle your extension to a single entrypoint.",-1),B=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Watch"),e("p",null,[n("The CLI supports rebuilding extensions whenever a file has changed by using the "),e("code",null,"--watch"),n(" flag.")])],-1),D=e("h3",{id:"configuring-the-cli"},[n("Configuring the CLI "),e("a",{class:"header-anchor",href:"#configuring-the-cli"},"#")],-1),S=e("p",null,[n("Most of the time, it should be sufficient to use the CLI as is. But, in some cases it might be necessary to customize it to your specific needs. This can be done by creating a "),e("code",null,"extension.config.js"),n(" file at the root of your extension package with the following content:")],-1),A=e("pre",null,[e("code",{class:"language-js"},[e("span",{class:"hljs-built_in"},"module"),n(`.exports = {
9
9
  `),e("span",{class:"hljs-attr"},"plugins"),n(`: [],
10
10
  };
11
- `)])],-1),M=e("h4",{id:"supported-options"},[n("Supported Options "),e("a",{class:"header-anchor",href:"#supported-options"},"#")],-1),N=e("ul",null,[e("li",null,[e("code",null,"plugins"),n(" \u2014 An array of Rollup plugins that will be used when building extensions in addition to the built-in ones.")])],-1),V=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"CommonJS or ESM"),e("p",null,[n("By using the "),e("code",null,"type"),n(" field inside your "),e("code",null,"package.json"),n(" file or using the appropriate file extension ("),e("code",null,".mjs"),n(" or "),e("code",null,".cjs"),n("), the config file can be loaded as a CommonJS or ESM file.")])],-1),W=e("h2",{id:"deploying-your-extension"},[n("Deploying your Extension "),e("a",{class:"header-anchor",href:"#deploying-your-extension"},"#")],-1),F=e("p",null,[n("To deploy your extension, you have to move the output from the "),e("code",null,"dist/"),n(" folder into your project\u2019s "),e("code",null,"./extensions/<extension-folder>/<extension-name>/"),n(" folder. "),e("code",null,"<extension-folder>"),n(" has to be replaced by the extension type in plural form (e.g. interfaces). "),e("code",null,"<extension-name>"),n(" should be replaced with the name of your extension.")],-1),J=e("div",{class:"warning hint"},[e("div",{class:"hint-title"},"Configurable Folders"),e("p",null,"The path to the built extension as well as the extensions directory are configurable and may be located elsewhere.")],-1),P=e("h2",{id:"developing-your-extension"},[n("Developing your Extension "),e("a",{class:"header-anchor",href:"#developing-your-extension"},"#")],-1),R=e("p",null,"To learn more about developing extensions of a specific type, you can refer to one of the individual guides:",-1),q=e("h4",{id:"app-extensions"},[n("App Extensions "),e("a",{class:"header-anchor",href:"#app-extensions"},"#")],-1),z=n("Interfaces"),H=n("Displays"),O=n("Layouts"),G=n("Modules"),K=e("h4",{id:"api-extensions"},[n("API Extensions "),e("a",{class:"header-anchor",href:"#api-extensions"},"#")],-1),Q=n("Hooks"),U=n("Endpoints"),ee={setup(X,{expose:a}){const i={title:"Creating Extensions",modularExtension:!1};return a({frontmatter:i}),(Y,Z)=>{const o=l("router-link"),d=l("DocsWrapper");return c(),u(d,{frontmatter:i},{default:t(()=>[e("div",r,[h,p,f,_,g,y,x,m,b,w,v,T,j,k,I,C,E,L,B,D,S,A,M,N,V,W,F,J,P,R,q,e("ul",null,[e("li",null,[s(o,{to:"/docs/extensions/interfaces/"},{default:t(()=>[z]),_:1})]),e("li",null,[s(o,{to:"/docs/extensions/displays/"},{default:t(()=>[H]),_:1})]),e("li",null,[s(o,{to:"/docs/extensions/layouts/"},{default:t(()=>[O]),_:1})]),e("li",null,[s(o,{to:"/docs/extensions/modules/"},{default:t(()=>[G]),_:1})])]),K,e("ul",null,[e("li",null,[s(o,{to:"/docs/extensions/hooks/"},{default:t(()=>[Q]),_:1})]),e("li",null,[s(o,{to:"/docs/extensions/endpoints/"},{default:t(()=>[U]),_:1})])])])]),_:1})}}};export{ee as default};
11
+ `)])],-1),M=e("h4",{id:"supported-options"},[n("Supported Options "),e("a",{class:"header-anchor",href:"#supported-options"},"#")],-1),N=e("ul",null,[e("li",null,[e("code",null,"plugins"),n(" \u2014 An array of Rollup plugins that will be used when building extensions in addition to the built-in ones.")])],-1),P=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"CommonJS or ESM"),e("p",null,[n("By using the "),e("code",null,"type"),n(" field inside your "),e("code",null,"package.json"),n(" file or using the appropriate file extension ("),e("code",null,".mjs"),n(" or "),e("code",null,".cjs"),n("), the config file can be loaded as a CommonJS or ESM file.")])],-1),V=e("h2",{id:"deploying-your-extension"},[n("Deploying your Extension "),e("a",{class:"header-anchor",href:"#deploying-your-extension"},"#")],-1),W=e("p",null,[n("To deploy your extension, you have to move the output from the "),e("code",null,"dist/"),n(" folder into your project\u2019s "),e("code",null,"./extensions/<extension-folder>/<extension-name>/"),n(" folder. "),e("code",null,"<extension-folder>"),n(" has to be replaced by the extension type in plural form (e.g. interfaces). "),e("code",null,"<extension-name>"),n(" should be replaced with the name of your extension.")],-1),F=e("div",{class:"warning hint"},[e("div",{class:"hint-title"},"Configurable Folders"),e("p",null,"The path to the built extension as well as the extensions directory are configurable and may be located elsewhere.")],-1),J=e("h2",{id:"developing-your-extension"},[n("Developing your Extension "),e("a",{class:"header-anchor",href:"#developing-your-extension"},"#")],-1),R=e("p",null,"To learn more about developing extensions of a specific type, you can refer to one of the individual guides:",-1),q=e("h4",{id:"app-extensions"},[n("App Extensions "),e("a",{class:"header-anchor",href:"#app-extensions"},"#")],-1),z=n("Interfaces"),H=n("Displays"),O=n("Layouts"),G=n("Modules"),K=n("Panels"),Q=e("h4",{id:"api-extensions"},[n("API Extensions "),e("a",{class:"header-anchor",href:"#api-extensions"},"#")],-1),U=n("Hooks"),X=n("Endpoints"),ne={setup(Y,{expose:a}){const i={title:"Creating Extensions",modularExtension:!1};return a({frontmatter:i}),(Z,$)=>{const o=l("router-link"),d=l("DocsWrapper");return c(),u(d,{frontmatter:i},{default:t(()=>[e("div",r,[h,p,f,_,g,y,x,m,b,w,v,T,j,k,I,C,E,L,B,D,S,A,M,N,P,V,W,F,J,R,q,e("ul",null,[e("li",null,[s(o,{to:"/docs/extensions/interfaces/"},{default:t(()=>[z]),_:1})]),e("li",null,[s(o,{to:"/docs/extensions/displays/"},{default:t(()=>[H]),_:1})]),e("li",null,[s(o,{to:"/docs/extensions/layouts/"},{default:t(()=>[O]),_:1})]),e("li",null,[s(o,{to:"/docs/extensions/modules/"},{default:t(()=>[G]),_:1})]),e("li",null,[s(o,{to:"/docs/extensions/panels/"},{default:t(()=>[K]),_:1})])]),Q,e("ul",null,[e("li",null,[s(o,{to:"/docs/extensions/hooks/"},{default:t(()=>[U]),_:1})]),e("li",null,[s(o,{to:"/docs/extensions/endpoints/"},{default:t(()=>[X]),_:1})])])])]),_:1})}}};export{ne as default};