在自定义http响应标头上显示过滤器 [英] Display filter on custom http response headers

查看:80
本文介绍了在自定义http响应标头上显示过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在NM 3.4中,是否可以过滤自定义http请求/响应标头的存在?自定义标头包含过滤器如何?谢谢

In NM 3.4, is there a way to filter for the existence of custom http request/response header? How about a custom header contains filter? Thanks

推荐答案

史蒂芬

如果知道要查找的自定义标头,则可以使用如下过滤器:

If you know the custom header you want to find you could use a filter like this:

HTTP&& ContainsBin(FrameData,ASCII,"X-Powered-By")

HTTP && ContainsBin(FrameData, ASCII, "X-Powered-By")

其中"X-Powered-By"表示在这种情况下是自定义字段.我们还为许多HTTP标头提供了许多属性,因此以下内容也适用:

Where the "X-Powered-By" is the custom field in this case.  We also have many properties for many HTTP headers, so the following also works:

Property.HttpXPoweredBy

Property.HttpXPoweredBy

您可以通过键入"Property.Http"来查看列表.在用户界面的过滤器窗口中.

You can see the list by typing "Property.Http" in the filter window of the UI.

但是,如果我们根本不认识任何内容,我们就不会设置任何内容.如果您希望包罗万象,则可能需要修改第750行附近的HTTP.npl文件,并在默认情况下添加另一个属性,以设置未知标头的标志.

However, we don't set anything up if we don't recognize it at all.  If you wanted a catch-all you'd probably want to modify the HTTP.npl file around line 750 and add another property to the default case to set a flag for an unknown header.

谢谢


这篇关于在自定义http响应标头上显示过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆