> For the complete documentation index, see [llms.txt](https://www.axisnow.io/zh/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.axisnow.io/zh/docs/edge/policies/request-processing/faq.md).

# 常见问题

请求处理的常见疑问与排错

<details>

<summary>浏览器报 ERR_TOO_MANY_REDIRECTS，怎么排查？</summary>

先用 `curl -s -o /dev/null -D - <URL>` 逐跳看 `Location`，分清跳转来自边缘的规则还是源站。

* **边缘的规则**：跳转目标仍命中跳转规则。常见原因是根域名跳 www 的条件没有限定源 Host，目标 `www.example.com` 也命中；或目标是 `http://` 而站点开启了强制 HTTPS。把目标 URL 填进**效果预览**，目标与示例相同即是循环。
* **源站的跳转**：回源使用 HTTP，源站又把 HTTP 请求跳转到 HTTPS，客户端每次经边缘到源站都被跳回来。把回源协议改为 HTTPS，或让源站按边缘发送的 `X-Forwarded-Proto` 判断协议，见[SSL/TLS 常见问题](/zh/docs/edge/policies/ssl-tls/faq.md)。

</details>

<details>

<summary>规则已经停用或改了目标，为什么浏览器仍然跳转？</summary>

301 和 308 被浏览器缓存，之后访问原地址不再发请求，边缘的改动看不到。清除该站点的浏览器缓存，或用隐私窗口、`curl` 验证；新规则先用临时跳转验证，见[最佳实践](/zh/docs/edge/policies/request-processing.md#best-practices)。

</details>

<details>

<summary>跳转后查询参数丢失？</summary>

四种方式对原查询串的处理不同：静态 URL 不携带，动态构建留空即沿用，通配符匹配看**保留原查询参数**开关，自定义脚本自行拼接，见[概述](/zh/docs/edge/policies/request-processing.md#redirect)。

</details>

<details>

<summary>通配符规则不生效？</summary>

模式匹配的是 `协议://Host/路径` 整体，要写完整，`https://www.example.com/blog/*` 不会匹配 HTTP 请求或其他 Host；查询串不参与匹配，模式里不能带 `?`。先在**效果预览**里用一个实际 URL 验证模式和模板，再看规则本身：预览不求值条件；序号更小的跳转规则条件也命中时，本规则不会被匹配。

</details>

<details>

<summary>自定义脚本没有跳转？</summary>

脚本返回了 `nil`，或运行出错——抛出异常、超出指令预算、返回值不是合法 URL——边缘按不跳转处理，请求照常回源，控制台不提示。在日志检索里看该请求：命中了规则而状态码不是 3xx，即脚本没有给出跳转。

</details>

<details>

<summary>边缘响应会被缓存或计入限速吗？</summary>

不会，边缘响应每次都在边缘生成，也不经过速率控制，见[概述](/zh/docs/edge/policies/request-processing.md#actions)；浏览器和中间缓存是否保留它，取决于配置的 `Cache-Control`。

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.axisnow.io/zh/docs/edge/policies/request-processing/faq.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
