[GH-ISSUE #40] 建议拦截可以自定义返回 #24

Closed
opened 2026-03-04 12:18:06 +03:00 by kerem · 3 comments
Owner

Originally created by @opcache on GitHub (May 10, 2021).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/40

建议

  • 拦截可以自定义返回文本或者HTML代码
  • 当前拦截会返回403,可以配置中自定义返回200,或者其他状态码
Originally created by @opcache on GitHub (May 10, 2021). Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/40 ## 建议 * 拦截可以自定义返回文本或者HTML代码 * 当前拦截会返回403,可以配置中自定义返回200,或者其他状态码
kerem 2026-03-04 12:18:06 +03:00
Author
Owner

@ADD-SP commented on GitHub (May 10, 2021):

自定义返回的 HTTP 状态码可以做,预计会在下一个测试版中加入。

返回自定义页面不做,因为有现成的方法。详见 https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page

<!-- gh-comment-id:836238850 --> @ADD-SP commented on GitHub (May 10, 2021): 自定义返回的 HTTP 状态码可以做,预计会在下一个测试版中加入。 返回自定义页面不做,因为有现成的方法。详见 https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page 。
Author
Owner

@ADD-SP commented on GitHub (May 10, 2021):

新增了一个配置项:waf_http_status,请下载最新的 beta 版,按照 配置语法 | ngx_waf 的说明进行操作。

<!-- gh-comment-id:836448558 --> @ADD-SP commented on GitHub (May 10, 2021): 新增了一个配置项:`waf_http_status`,请下载最新的 beta 版,按照 [配置语法 | ngx_waf](https://add-sp.github.io/ngx_waf/zh-cn/advance/syntax.html) 的说明进行操作。
Author
Owner

@ADD-SP commented on GitHub (May 16, 2021):

v5.3.0 已经发布,如测试后无问题请关闭本 issue。

<!-- gh-comment-id:841756300 --> @ADD-SP commented on GitHub (May 16, 2021): [v5.3.0](https://github.com/ADD-SP/ngx_waf/releases/tag/v5.3.0) 已经发布,如测试后无问题请关闭本 issue。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ngx_waf#24
No description provided.