Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from sanic-org/main
Browse files Browse the repository at this point in the history
Merge from sanic-org
  • Loading branch information
miss85246 authored May 5, 2021
2 parents 0800362 + b63cc05 commit 31624b2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/en/guide/basics/headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ Most of the time you will want to use the .get() or .getone() method can be used

#### Request ID

---:1

::: new

New in v21.3, often it is convenient or necessary to track a request by its `X-Request-ID` header. You can easily access that as: `request.id`.
Expand Down
1 change: 1 addition & 0 deletions src/en/guide/project/policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Sanic releases a long term support release (aka "LTS") once a year in December.

| Version | LTS | Supported |
| ------- | ------------- | ----------------------- |
| 21.3 | | :white_check_mark: |
| 20.12 | until 2022-12 | :white_check_mark: |
| 20.9 | | :x: |
| 20.6 | | :x: |
Expand Down
11 changes: 7 additions & 4 deletions src/zh/guide/basics/headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4

:---

#### 代理头(Proxy headers)

Sanic 对代理头也有着特殊的处理,具体的细节请参考 [代理头](/zh/guide/advanced/proxy-headers.md) 章节的解释

---:1

#### 其他标头(Other headers)

您可以在请求对象中使用所有的请求头,并且可以通过字典的方式来进行访问。Headers 的键名不考虑大小写,可以通过大写或小写键名来进行访问。
Expand Down Expand Up @@ -104,14 +110,11 @@ $ curl localhost:9999/headers -H "Foo: one" -H "FOO: two"|jq

:::

#### 代理头(Proxy headers)

Sanic 对代理头也有着特殊的处理,具体的细节请参考 [代理头](/zh/guide/advanced/proxy-headers.md) 章节的解释
#### Request ID

---:1

#### Request ID

::: new v21.3 新增

通常无论是出于必须还是为了方便,会使用 `X-Request-ID` 中的值来追踪某个请求。您可以直接通过 `request.id` 来获取该值。
Expand Down
1 change: 1 addition & 0 deletions src/zh/guide/project/policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Sanic 将在每年的 12 月发布一次长期支持版本(TLS 版本)TLS

| Version | LTS | Supported |
| ------- | ------------- | ----------------------- |
| 21.3 | | :white_check_mark: |
| 20.12 | 2022-12 为止 | :white_check_mark: |
| 20.9 | | :x: |
| 20.6 | | :x: |
Expand Down

0 comments on commit 31624b2

Please sign in to comment.