Skip to content

Commit

Permalink
docs: fix typo #243
Browse files Browse the repository at this point in the history
  • Loading branch information
sylingd committed Jul 4, 2024
1 parent e408093 commit b463d38
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/docs/guide/custom-function.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if (val.includes('utm_source')) {

## Modify the request headers and response headers

The incoming parameter is an array containing all header information in the following format: `[{"name: "header name", "value": "header content"} ... ]`.
The incoming parameter is an array containing all header information in the following format: `[{"name": "header name", "value": "header content"} ... ]`.

Because JS pass the Object by reference, the custom function does not need any return value, only need to modify the incoming parameters to take effect. For example, this code will add ` HE/2.0.0` to the end of `User-Agent`:

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guide/custom-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if (val.includes('utm_source')) {

## 修改请求头和响应头

传入参数为一个数组,包含所有头信息,格式为:`[{"name: "头名称", "value": "头内容"} …… ]`
传入参数为一个数组,包含所有头信息,格式为:`[{"name": "头名称", "value": "头内容"} …… ]`

因JS传递Object时是引用传递,因此自定义函数不需要任何返回值,只需要修改传入的参数即可生效。例如,此代码会将`User-Agent`加上` HE/2.0.0`

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guide/custom-function.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if (val.includes('utm_source')) {

## 變更要求標頭和回應標頭

傳入參數為一個陣列,包含所有標頭資訊,格式為:`[{"name: "標頭名稱", "value": "標內容"} …… ]`
傳入參數為一個陣列,包含所有標頭資訊,格式為:`[{"name": "標頭名稱", "value": "標內容"} …… ]`

因JS傳遞Object時是參照傳遞,因此自訂函數不需要任何傳回值,只需要變更傳入的參數即可生效。例如,此語法會將`User-Agent`加上` HE/2.0.0`

Expand Down

0 comments on commit b463d38

Please sign in to comment.