Skip to content

docs: fix typo in real-ip.md#12236

Merged
Baoyuantop merged 1 commit into
apache:masterfrom
xuruidong:patch-1
May 26, 2025
Merged

docs: fix typo in real-ip.md#12236
Baoyuantop merged 1 commit into
apache:masterfrom
xuruidong:patch-1

Conversation

@xuruidong

Copy link
Copy Markdown
Contributor

Description

Which issue(s) this PR fixes:

Fixes #

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. doc Documentation things labels May 20, 2025
## 描述

`real-ip` 插件允许 APISIX 通过 HTTP 请求头或 HTTP 查询字符串中传递的 IP 地址设置客户端的真实 IP。当 APISIX 位于反向代理之后时,此功能尤其有用,因为否则代理可能会被视为请求发起客户端
`real-ip` 插件允许 APISIX 通过 HTTP 请求头或 HTTP 查询字符串中传递的 IP 地址设置客户端的真实 IP。当 APISIX 位于反向代理之后时,此功能尤其有用,因为在这种情况下,代理可能会被视为请求发起客户端

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`real-ip` 插件允许 APISIX 通过 HTTP 请求头或 HTTP 查询字符串中传递的 IP 地址设置客户端的真实 IP。当 APISIX 位于反向代理之后时,此功能尤其有用,因为在这种情况下,代理可能会被视为请求发起客户端
`real-ip` 插件允许 APISIX 通过 HTTP 请求头或 HTTP 查询字符串中传递的 IP 地址设置客户端的真实 IP。当 APISIX 位于反向代理之后时,此功能尤其有用,否则反向代理可能会被误认为是请求的真实客户端

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Baoyuantop , thinks for your review. I feel that using "否则" (otherwise) in this sentence sounds a bit odd, almost like a grammatical error. I asked DeepSeek about it, and here’s its response:

为什么原句的“否则”不合适?
“否则” 通常用于 “如果 A 不成立,那么 B 会发生”,例如:

“你必须开启 real-ip 插件,否则 APISIX 可能无法获取真实客户端 IP。”

但原句想表达的是 “反向代理的存在会导致误判”,而不是 “如果不做某件事,就会发生误判”,所以 “否则” 显得逻辑不连贯。

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either of these is more clear than the original. I've approved the change.

@Baoyuantop
Baoyuantop requested a review from kayx23 May 21, 2025 05:53
@Baoyuantop
Baoyuantop merged commit 85563f0 into apache:master May 26, 2025
@xuruidong
xuruidong deleted the patch-1 branch May 26, 2025 04:02
laz-xyr pushed a commit to laz-xyr/apisix that referenced this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Documentation things size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants