Skip to content

Commit d32a46e

Browse files
committed
翻译timeouts指令
1 parent 66eab09 commit d32a46e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

docs-cn/HTTP Directives/timeouts.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# http.timeouts
22
timeouts configures Caddy's HTTP timeouts:
3-
timeouts是针对Caddy的HTTP超时配置
3+
timeouts 针对Caddy的HTTP超时配置
44

55
Read: Maximum duration for reading the entire request, including the body.
66
Read Header: The amount of time allowed to read request headers.
@@ -11,15 +11,13 @@ Timeouts are an important way to maintain server connectivity in the face of bug
1111
Because timeouts apply to an entire HTTP server which may serve multiple sites defined in your Caddyfile, the timeout values for each site will be reduced to their minimum values (with 0 or none being the lowest) across all sites that share that server. It's a good idea to keep your timeouts the same or just set them on one site to avoid confusion. A timeout set on one site will apply to all sites that share that server.
1212

1313
## 语法
14-
To set all the timeouts to the same value:
15-
14+
将所有超时设置为相同的值:
1615
```
1716
timeouts val
1817
```
18+
* **val** 适用于所有超时的持续时间值(例如30s,2m30s,5m,1h),设置为0或无,以禁用以前启用的超时。
1919

20-
val is a duration value (e.g. 30s, 2m30s, 5m, 1h) that will apply to all timeouts. Set to 0 or none to disable timeouts that were previously enabled.
21-
You can also configure each timeout individually:
22-
20+
你还可以单独配置每个超时:
2321
```
2422
timeouts {
2523
read val
@@ -38,7 +36,7 @@ Set all timeouts to 1 minute:
3836
timeouts 1m
3937
```
4038

41-
Set custom read timeout and write timeouts:
39+
设置自定义读取和写入超时:
4240

4341
```
4442
timeouts {

0 commit comments

Comments
 (0)