chore: update docs of auth

This commit is contained in:
Jacky 2024-07-20 10:50:22 +08:00
parent 3b937ee0f4
commit d6b22c157c
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
11 changed files with 1034 additions and 807 deletions

View file

@ -39,7 +39,8 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
{text: 'Open AI', link: '/guide/config-openai'},
{text: 'Casdoor', link: '/guide/config-casdoor'},
{text: 'Logrotate', link: '/guide/config-logrotate'},
{text: 'Cluster', link: '/guide/config-cluster'}
{text: 'Cluster', link: '/guide/config-cluster'},
{text: 'Auth', link: '/guide/config-auth'}
]
},
{

View file

@ -44,7 +44,8 @@ export const zhCNConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
{text: 'Open AI', link: '/zh_CN/guide/config-openai'},
{text: 'Casdoor', link: '/zh_CN/guide/config-casdoor'},
{text: 'Logrotate', link: '/zh_CN/guide/config-logrotate'},
{text: '集群', link: '/zh_CN/guide/config-cluster'}
{text: '集群', link: '/zh_CN/guide/config-cluster'},
{text: '认证', link: '/zh_CN/guide/config-auth'}
]
},
{

View file

@ -43,7 +43,8 @@ export const zhTWConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
{text: 'Open AI', link: '/zh_TW/guide/config-openai'},
{text: 'Casdoor', link: '/zh_TW/guide/config-casdoor'},
{text: 'Logrotate', link: '/zh_TW/guide/config-logrotate'},
{text: '集群', link: '/zh_TW/guide/config-cluster'}
{text: '集群', link: '/zh_TW/guide/config-cluster'},
{text: '認證', link: '/zh_TM/guide/config-auth'}
]
},
{

18
docs/guide/config-auth.md Normal file
View file

@ -0,0 +1,18 @@
# Auth
From v2.0.0-beta.26, you can authorization settings in the `auth` section of the configuration file.
## IPWhiteList
- Type: `string`
- Example: `10.0.0.1`
```ini
[auth]
IPWhiteList = 10.0.0.1
IPWhiteList = 10.0.0.2
IPWhiteList = 10.0.0.3
```
By default, if you do not set the `IPWhiteList`, all IP addresses are allowed to access the Nginx UI.
Once you set the `IPWhiteList`, only the users from IP addresses in the list and `127.0.0.1` can access the Nginx UI,
others will receive a `403 Forbidden` error.

View file

@ -63,6 +63,12 @@ Applicable for version v2.0.0-beta.23 and above.
| CMD | NGINX_UI_LOGROTATE_CMD |
| Interval | NGINX_UI_LOGROTATE_INTERVAL |
## Auth
| Configuration Setting | Environment Variable |
|-----------------------|-----------------------------|
| IPWhiteList | NGINX_UI_AUTH_IPWhiteList |
## Predefined User
In skip installation mode, you can set the following environment variables to create a predefined user:

View file

@ -7,11 +7,11 @@
"docs:preview": "vitepress preview"
},
"dependencies": {
"vue": "^3.4.26",
"vitepress": "^1.1.4"
"vitepress": "^1.3.1",
"vue": "^3.4.33"
},
"devDependencies": {
"@types/node": "^20.12.8",
"@types/node": "^20.14.11",
"less": "^4.2.0"
},
"license": "AGPL-3.0",

1743
docs/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
# Auth
从 v2.0.0-beta.26 版本开始,您可以在配置文件的 `auth` 部分设置授权选项。
## IPWhiteList
- 类型:`string`
- 示例:`10.0.0.1`
```ini
[auth]
IPWhiteList = 10.0.0.1
IPWhiteList = 10.0.0.2
IPWhiteList = 10.0.0.3
```
默认情况下,如果您没有设置 `IPWhiteList`,所有 IP 地址都允许访问 Nginx UI。
一旦您设置了 `IPWhiteList`,只有列表中和 `127.0.0.1` 的 IP 地址的用户可以访问 Nginx UI
其他人将收到 `403 Forbidden` 错误。

View file

@ -1,7 +1,7 @@
# 环境变量
适用于 v2.0.0-beta.23 及以上版本
## 服务器
## Server
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
@ -63,6 +63,12 @@
| CMD | NGINX_UI_LOGROTATE_CMD |
| Interval | NGINX_UI_LOGROTATE_INTERVAL |
## Auth
| Configuration Setting | Environment Variable |
|-----------------------|-----------------------------|
| IPWhiteList | NGINX_UI_AUTH_IPWhiteList |
## 预定义用户
在跳过安装模式下,您可以设置以下环境变量以创建预定义用户:

View file

@ -0,0 +1,17 @@
# Auth
從 v2.0.0-beta.26 版本開始,您可以在配置文件的 `auth` 部分設置授權選項。
## IPWhiteList
- 類型:`string`
- 範例:`10.0.0.1`
```ini
[auth]
IPWhiteList = 10.0.0.1
IPWhiteList = 10.0.0.2
IPWhiteList = 10.0.0.3
```
默認情況下,如果您沒有設置 IPWhiteList所有 IP 地址都允許訪問 Nginx UI。
一旦您設置了 IPWhiteList只有列表中和 `127.0.0.1` 的 IP 地址的用戶可以訪問 Nginx UI
其他人將收到 `403 Forbidden` 錯誤。

View file

@ -1,7 +1,7 @@
# 環境變量
適用於 v2.0.0-beta.23 及以上版本
## 伺服器
## Server
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
@ -63,6 +63,12 @@
| CMD | NGINX_UI_LOGROTATE_CMD |
| Interval | NGINX_UI_LOGROTATE_INTERVAL |
## Auth
| Configuration Setting | Environment Variable |
|-----------------------|-----------------------------|
| IPWhiteList | NGINX_UI_AUTH_IPWhiteList |
## 預定義使用者
在跳過安裝模式下,您可以設置以下環境變量以創建預定義使用者: