mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Allow environment syntax prefix per item within an array (#8257)
* Updating environment syntax prefix to identify prefix per item * Updating environment syntax prefix documentation to show how to add prefix to array value * Add additional example Co-authored-by: Juan Carlos Blanco Delgado <juancarlosjr97@gmail.com> Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -429,12 +429,12 @@ Directus will attempt to automatically type cast environment variables based on
|
||||
([see above](#type-casting-and-nesting)). 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 `{type}:`. The following types are available:
|
||||
|
||||
| Syntax Prefix | Example | Output |
|
||||
| ------------- | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| `string` | `string:value` | `"value"` |
|
||||
| `number` | `number:3306` | `3306` |
|
||||
| `regex` | `regex:/\.example\.com$/` | `/\.example\.com$/` |
|
||||
| `array` | `array:https://example.com,https://example2.com` | `["https://example.com","https://example2.com"]` |
|
||||
| Syntax Prefix | Example | Output |
|
||||
| ------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `string` | `string:value` | `"value"` |
|
||||
| `number` | `number:3306` | `3306` |
|
||||
| `regex` | `regex:/\.example\.com$/` | `/\.example\.com$/` |
|
||||
| `array` | `array:https://example.com,https://example2.com` <br> `array:string:https://example.com,regex:/\.example3\.com$/` | `["https://example.com", "https://example2.com"]` <br> `["https://example.com", "https://example2.com", /\.example3\.com$/]` |
|
||||
|
||||
## File Based Environment Variables (Docker Secrets)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user