|
| 1 | +--- |
| 2 | +title: Cortex Config |
| 3 | +description: Cortex config command |
| 4 | +slug: "config" |
| 5 | +--- |
| 6 | + |
| 7 | +import Tabs from "@theme/Tabs"; |
| 8 | +import TabItem from "@theme/TabItem"; |
| 9 | + |
| 10 | +# `cortex config` |
| 11 | + |
| 12 | +This command allows you to update server configurations such as CORS and Allowed Headers. |
| 13 | + |
| 14 | +## Usage |
| 15 | +:::info |
| 16 | +You can use the `--verbose` flag to display more detailed output of the internal processes. To apply this flag, use the following format: `cortex --verbose [subcommand]`. |
| 17 | +::: |
| 18 | + |
| 19 | +<Tabs> |
| 20 | + <TabItem value="MacOs/Linux" label="MacOs/Linux"> |
| 21 | + ```sh |
| 22 | + cortex config [options] [subcommand] |
| 23 | + ``` |
| 24 | + </TabItem> |
| 25 | + <TabItem value="Windows" label="Windows"> |
| 26 | + ```sh |
| 27 | + cortex.exe config [options] [subcommand] |
| 28 | + ``` |
| 29 | + </TabItem> |
| 30 | +</Tabs> |
| 31 | + |
| 32 | +**Options**: |
| 33 | + |
| 34 | +| Option | Description | Required | Default value | Example | |
| 35 | +|------------------|-------------------------------------------|----------|----------------------|---------| |
| 36 | +| `--cors` | Toggle CORS | No | true | `on`, `off` | |
| 37 | +| `--allowed_origins`| Allowed origins for CORS | No | `http://localhost:39281`, `http://127.0.0.1:39281` | `http://localhost:3000` | |
| 38 | +| `-h`, `--help` | Display help information for the command. | No | - | `-h` | |
| 39 | + |
| 40 | +--- |
| 41 | +# Subcommands: |
| 42 | + |
| 43 | +## `cortex config status` |
| 44 | +:::info |
| 45 | +This CLI command calls the following API endpoint: |
| 46 | +- [Get Configurations](/api-reference#tag/configurations/get/v1/configs) |
| 47 | +::: |
| 48 | +This command returns all server configurations. |
| 49 | + |
| 50 | +**Usage**: |
| 51 | +<Tabs> |
| 52 | + <TabItem value="MacOs/Linux" label="MacOs/Linux"> |
| 53 | + ```sh |
| 54 | + cortex config status |
| 55 | + ``` |
| 56 | + </TabItem> |
| 57 | + <TabItem value="Windows" label="Windows"> |
| 58 | + ```sh |
| 59 | + cortex.exe config status |
| 60 | + |
| 61 | + ``` |
| 62 | + </TabItem> |
| 63 | +</Tabs> |
| 64 | + |
| 65 | +For example, it returns the following: |
| 66 | + |
| 67 | +``` |
| 68 | ++-------------------------------------------------------------------------------------+ |
| 69 | +| Config name | Value | |
| 70 | ++-------------------------------------------------------------------------------------+ |
| 71 | +| allowed_origins | http://localhost:39281 | |
| 72 | ++-------------------------------------------------------------------------------------+ |
| 73 | +| allowed_origins | http://127.0.0.1:39281/ | |
| 74 | ++-------------------------------------------------------------------------------------+ |
| 75 | +| cors | true | |
| 76 | ++-------------------------------------------------------------------------------------+ |
| 77 | +
|
| 78 | +``` |
0 commit comments