Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 0075e5f

Browse files
committed
chore: CORS CLI doc
1 parent ba4c625 commit 0075e5f

File tree

3 files changed

+80
-1
lines changed

3 files changed

+80
-1
lines changed

docs/docs/cli/config.mdx

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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+
```

docs/docs/cli/start.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ You can use the `--verbose` flag to display more detailed output of the internal
3535
| ---------------------------- | ----------------------------------------- | -------- | ------------- | ----------------------------- |
3636
| `-h`, `--help` | Display help information for the command. | No | - | `-h` |
3737
| `-p`, `--port <port>` | Port to serve the application. | No | - | `-p 39281` |
38-
| `--loglevel <loglevel>` | Setup loglevel for cortex server, supported levels are TRACE, DEBUG, INFO, WARN, ERROR | No | - | `--loglevel DEBUG` |
38+
| `--loglevel <loglevel>` | Setup loglevel for cortex server, in the priority of `ERROR`, `WARN`, `INFO`, `DEBUG`, `TRACE` | No | - | `--loglevel INFO` will display ERROR, WARN and INFO logs|
3939

4040
<!-- | `-a`, `--address <address>` | Address to use. | No | - | `-a 192.168.1.1` | -->
4141
<!--| `--dataFolder <dataFolder>` | Set the data folder directory | No | - | `--dataFolder /path/to/data` | -->

docs/sidebars.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ const sidebars: SidebarsConfig = {
166166
{ type: "doc", id: "cli/cortex", label: "cortex" },
167167
{ type: "doc", id: "cli/start", label: "cortex start" },
168168
{ type: "doc", id: "cli/run", label: "cortex run" },
169+
{ type: "doc", id: "cli/config", label: "cortex config" },
169170
// { type: "doc", id: "cli/embeddings", label: "cortex embeddings" },
170171
// { type: "doc", id: "cli/presets", label: "cortex presets" },
171172
{ type: "doc", id: "cli/pull", label: "cortex pull" },

0 commit comments

Comments
 (0)