Skip to content

Commit d6b22c1

Browse files
committed
chore: update docs of auth
1 parent 3b937ee commit d6b22c1

File tree

11 files changed

+1052
-825
lines changed

11 files changed

+1052
-825
lines changed

docs/.vitepress/config/en.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
3939
{text: 'Open AI', link: '/guide/config-openai'},
4040
{text: 'Casdoor', link: '/guide/config-casdoor'},
4141
{text: 'Logrotate', link: '/guide/config-logrotate'},
42-
{text: 'Cluster', link: '/guide/config-cluster'}
42+
{text: 'Cluster', link: '/guide/config-cluster'},
43+
{text: 'Auth', link: '/guide/config-auth'}
4344
]
4445
},
4546
{

docs/.vitepress/config/zh_CN.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export const zhCNConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4444
{text: 'Open AI', link: '/zh_CN/guide/config-openai'},
4545
{text: 'Casdoor', link: '/zh_CN/guide/config-casdoor'},
4646
{text: 'Logrotate', link: '/zh_CN/guide/config-logrotate'},
47-
{text: '集群', link: '/zh_CN/guide/config-cluster'}
47+
{text: '集群', link: '/zh_CN/guide/config-cluster'},
48+
{text: '认证', link: '/zh_CN/guide/config-auth'}
4849
]
4950
},
5051
{

docs/.vitepress/config/zh_TW.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ export const zhTWConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4343
{text: 'Open AI', link: '/zh_TW/guide/config-openai'},
4444
{text: 'Casdoor', link: '/zh_TW/guide/config-casdoor'},
4545
{text: 'Logrotate', link: '/zh_TW/guide/config-logrotate'},
46-
{text: '集群', link: '/zh_TW/guide/config-cluster'}
46+
{text: '集群', link: '/zh_TW/guide/config-cluster'},
47+
{text: '認證', link: '/zh_TM/guide/config-auth'}
4748
]
4849
},
4950
{

docs/guide/config-auth.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Auth
2+
From v2.0.0-beta.26, you can authorization settings in the `auth` section of the configuration file.
3+
4+
## IPWhiteList
5+
- Type: `string`
6+
- Example: `10.0.0.1`
7+
8+
```ini
9+
[auth]
10+
IPWhiteList = 10.0.0.1
11+
IPWhiteList = 10.0.0.2
12+
IPWhiteList = 10.0.0.3
13+
```
14+
15+
By default, if you do not set the `IPWhiteList`, all IP addresses are allowed to access the Nginx UI.
16+
17+
Once you set the `IPWhiteList`, only the users from IP addresses in the list and `127.0.0.1` can access the Nginx UI,
18+
others will receive a `403 Forbidden` error.

docs/guide/env.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ Applicable for version v2.0.0-beta.23 and above.
6363
| CMD | NGINX_UI_LOGROTATE_CMD |
6464
| Interval | NGINX_UI_LOGROTATE_INTERVAL |
6565

66+
## Auth
67+
68+
| Configuration Setting | Environment Variable |
69+
|-----------------------|-----------------------------|
70+
| IPWhiteList | NGINX_UI_AUTH_IPWhiteList |
71+
6672
## Predefined User
6773

6874
In skip installation mode, you can set the following environment variables to create a predefined user:

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"docs:preview": "vitepress preview"
88
},
99
"dependencies": {
10-
"vue": "^3.4.26",
11-
"vitepress": "^1.1.4"
10+
"vitepress": "^1.3.1",
11+
"vue": "^3.4.33"
1212
},
1313
"devDependencies": {
14-
"@types/node": "^20.12.8",
14+
"@types/node": "^20.14.11",
1515
"less": "^4.2.0"
1616
},
1717
"license": "AGPL-3.0",

0 commit comments

Comments
 (0)