We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b5f371 commit ced4987Copy full SHA for ced4987
README.md
@@ -34,3 +34,6 @@ http://localhost:8000/token/token123456/https/www.360.cn
34
```
35
http://localhost:8000/token/token123456/http/example.com
36
37
+
38
+可以设定请求头中的字段"x-proxy-redirect"为"error" | "follow" |
39
+"manual"来设定代理行为的重定向方式.
middleware.ts
@@ -182,7 +182,10 @@ export async function reverse_proxy(
182
method: request.method,
183
body: request.body,
184
/* 关闭重定向 */
185
- redirect: "manual",
+ /* 可以设定请求头中的字段"x-proxy-redirect"为"error" | "follow" |
186
+"manual"来设定代理行为的重定向方式. */
187
+ redirect: (requestHeaders.get("x-proxy-redirect") ??
188
+ "manual") as RequestRedirect,
189
});
190
console.log(
191
JSON.stringify(
0 commit comments