Skip to content

Commit 55efdac

Browse files
committed
update doc and style
1 parent 5af3eb9 commit 55efdac

File tree

6 files changed

+60
-1
lines changed

6 files changed

+60
-1
lines changed

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ post_asset_folder: false
1515
per_page: 0
1616
default_layout: page
1717

18+
marked:
19+
gfm: false
20+
1821
theme: navy
1922
deploy:
2023
type: git

db.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

source/rewrite/directives.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ title: Rewrite Directive
33

44
> If you are willing to help hiproxy to write documentation, please contact zdying@live.com, thank you!
55
6+
<style>
7+
h3 {margin-top: 5em!important;}
8+
h3:first-of-type {margin-top: 1em!important;}
9+
10+
h4 {margin-top: 5em!important;}
11+
</style>
12+
613
## Directive
714

815
`directive`(known as `command`)is for setting variable, or manipulating request/response.
@@ -25,6 +32,14 @@ Example:
2532
set $server hiipack;
2633
```
2734

35+
36+
37+
38+
39+
40+
41+
42+
2843
### Request Directives
2944

3045
The directives are `Request` instances to send request from proxy to target server.

source/rewrite/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,23 @@ $domain => {
5454
# ...
5555
}
5656
```
57+
58+
Or
59+
60+
```bash
61+
set $domain some.example.com
62+
63+
# use a domain name directly
64+
domain some.example.com {
65+
# ...
66+
}
67+
68+
# or use a variable
69+
domain $domain {
70+
# ...
71+
}
72+
```
73+
5774
### location
5875

5976
`location` represent a specific path. All configuration about the path should be in the `location` block.

source/zh-cn/rewrite/directives.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ title: rewrite指令
55
>
66
> If you are willing to help hiproxy to write documentation, please contact zdying@live.com, thank you!
77
8+
<style>
9+
h3 {margin-top: 5em!important;}
10+
h3:first-of-type {margin-top: 1em!important;}
11+
12+
h4 {margin-top: 5em!important;}
13+
</style>
14+
815
## 指令
916

1017
`指令`(也称:`命令`)用于设置变量,或者对request/response做一些操作。

source/zh-cn/rewrite/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,23 @@ $domain => {
5656
# ...
5757
}
5858
```
59+
60+
或者
61+
62+
```bash
63+
set $domain some.example.com
64+
65+
# 直接使用域名
66+
domain some.example.com {
67+
# ...
68+
}
69+
70+
# 或者使用变量
71+
domain $domain {
72+
# ...
73+
}
74+
```
75+
5976
### location
6077

6178
location 用来指定域名中的一个具体的路径,这个路径的所有配置都在 location 块中。

0 commit comments

Comments
 (0)