当前位置: 首页 > news >正文

如何通过网站做网上报名系统天津网站排名提升

如何通过网站做网上报名系统,天津网站排名提升,影视公司网站模板,好看的移动端网页tcp-log-with-body 介绍 Kong的tcp-log-with-body插件是一个高效的工具,它能够转发Kong处理的请求和响应。这个插件非常适用于需要详细记录API请求和响应信息的情景,尤其是在调试和排查问题时。 软件环境说明 kong version 2.1.4 - 2.8.3 [可用亲测]C…

tcp-log-with-body

介绍

Kong的tcp-log-with-body插件是一个高效的工具,它能够转发Kong处理的请求和响应。这个插件非常适用于需要详细记录API请求和响应信息的情景,尤其是在调试和排查问题时。

Kong的tcp-log-with-body插件

软件环境说明
  • kong version 2.1.4 - 2.8.3 [可用亲测]
  • CentOS version 7.3.1611
kong version --vv
2024/02/29 00:17:48 [verbose] Kong: 2.1.4
2024/02/29 00:17:48 [debug] ngx_lua: 10015
2024/02/29 00:17:48 [debug] nginx: 1015008
2024/02/29 00:17:48 [debug] Lua: LuaJIT 2.1.0-beta3
2.1.4cat /etc/centos-release
CentOS Linux release 7.3.1611 (Core) 
插件安装教程
  1. 找到 kong 插件存放位置
[root@bwg] - [/usr/local/share/lua/5.1/kong/plugins] - [2024-02-28 11:52:33]
└─[0] ls
acl              basic-auth      file-log      http-log-with-body  key-auth         post-function  request-size-limiting  session            udp-log
acme             bot-detection   grpc-gateway  http-mirror         ldap-auth        pre-function   request-termination    statsd             zipkin
aws-lambda       correlation-id  grpc-web      ip-restriction      loggly           prometheus     request-transformer    syslog
azure-functions  cors            hmac-auth     jwt                 log-serializers  proxy-cache    response-ratelimiting  tcp-log
base_plugin.lua  datadog         http-log      kafka-log           oauth2           rate-limiting  response-transformer   tcp-log-with-body
  1. git 克隆项目到plugins目录下
git clone https://gitee.com/XiongMingcai/tcp-log-with-body.git
  1. 修改kong配置文件 加入启用tcp-log-with-body 插件
vim /etc/kong/kong.conf

修改位置

plugins = bundled,tcp-log-with-body 
  1. 重启kong

监听启动错误日志

tail -f /usr/local/kong/logs/error.log 

重启kong

sudo systemctl restart kong
使用说明
  1. 配置tcp-log-with-body插件(见封面图)

  2. 接收日志tcp请求 node.js 模拟tcp-log-server

const net = require('net');
const {inspect} = require("util");// Create a server instance
const server = net.createServer((socket) => {socket.on('data', (data) => {// 将数据转换为字符串,并以JSON格式输出const dataString = data.toString('utf8');console.log("Received data:", inspect(JSON.parse(dataString), false, null, true));});socket.on('end', () => {});
});// Error callback
server.on('error', (err) => {console.error('Server error:', err);
});// Listening callback
server.listen(9999, '127.0.0.1', () => {console.log('Server is listening on 127.0.0.1:9999');
});
  1. 效果
.....request: {querystring: {},size: '563',uri: '/ok',url: 'https://ssl.hunangl.com:443/ok',headers: {host: 'ssl.hunangl.com',authorization: 'REDACTED','postman-token': 'a0cf800e-06ac-41b0-8a4d-d849c945cee1',accept: '*/*',digest: 'SHA-256=eji/gfOD9pQzrW6QDTWz4jhVk/dqe3q11DVbi6Qe4ks=','request-id': '5c54a71f-9bdb-445c-8549-f4af181ad49c','cache-control': 'no-cache','content-length': '13','accept-encoding': 'gzip, deflate, br','user-agent': 'PostmanRuntime/7.36.3','x-date': 'Thu, 29 Feb 2024 05:14:21 GMT',connection: 'keep-alive','content-type': 'application/json'},body: '{"foo":"bar"}',method: 'POST'},client_ip: '54.86.50.139',
.....
response: {body: '{"host":"0.0.0.0:8300","connection":"keep-alive","x-forwarded-for":"54.86.50.139","x-forwarded-proto":"https","x-forwarded-host":"ssl.hunangl.com","x-forwarded-port":"443","x-real-ip":"54.86.50.139","content-length":"13","x-date":"Thu, 29 Feb 2024 05:14:21 GMT","authorization":"hmac username=\\"hmac_username\\", algorithm=\\"hmac-sha256\\", headers=\\"x-date request-line digest\\", signature=\\"Kh+sGhrL3NbFNa9dsLdTs/q6hMBublOEPYUw4j8rLGM=\\"","digest":"SHA-256=eji/gfOD9pQzrW6QDTWz4jhVk/dqe3q11DVbi6Qe4ks=","content-type":"application/json","user-agent":"PostmanRuntime/7.36.3","accept":"*/*","cache-control":"no-cache","postman-token":"a0cf800e-06ac-41b0-8a4d-d849c945cee1","accept-encoding":"gzip, deflate, br","request-id":"5c54a71f-9bdb-445c-8549-f4af181ad49c"}',headers: {'content-type': 'application/json; charset=utf-8',date: 'Thu, 29 Feb 2024 05:14:15 GMT',connection: 'close','server-port': '8300','request-ip': '54.86.50.139','content-length': '761',via: 'kong/2.1.4','x-kong-proxy-latency': '6','x-kong-upstream-latency': '12','request-id': '5c54a71f-9bdb-445c-8549-f4af181ad49c'},status: 200,size: '1075'},
.....
http://www.hrbkazy.com/news/37564.html

相关文章:

  • 网站建设工作室小俊哥长沙网站seo分析
  • 做网站多大上行速度百度云网盘资源搜索引擎入口
  • 如何查看网站开发商淘宝关键词查询工具哪个好
  • 上海网站设计网页设计迅速上排名网站优化
  • 做心理咨询可以在哪些网站发贴泰安短视频seo
  • 番禺人才网招聿搜索引擎优化与推广技术
  • 百度网站官网入口网址在百度上怎么发布广告
  • 做搜狗手机网站快速排seo网站课程
  • 文化馆为何需要建设自己的网站南京网站制作
  • 菠菜建设网站手机网站排名优化软件
  • 南宁门户网站有哪些品牌推广策略有哪几种
  • 域名备案了 怎么建设网站今日西安头条最新消息
  • 响应式网站自助建设平台云浮新增确诊病例30例
  • 网站颜色正确搭配实例seo案例分析
  • wordpress video模板一个网站可以优化多少关键词
  • 网页设计工具有哪些seo深圳培训班
  • 沈阳网站制作联系方式产品软文怎么写
  • 上海网站建设高端windows优化大师好吗
  • 北京网页设计公司兴田德润优惠seo在线培训课程
  • 网站外链建设教程中国免费域名注册平台
  • 做网站需要懂代码么成都网站关键词推广
  • 防网站黑客外贸营销网站怎么建站
  • 做网站的qq兼职每日新闻快报
  • 简约式网站模板北京seo相关
  • 网站制作自学网汽车行业网站建设
  • 网站建设不开单开发新客户的十大渠道
  • 我下载的免费网站模版源代码是加密的重庆网站seo教程
  • 太原要做网站的公司苏州网站seo服务
  • 建网站怎么做市场推广工作内容
  • 哪有做网站的北京cms建站模板